mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
[kernel] Fix frame allocation for multiple pages
There was an inverted boolean logic in determining how many consecutive pages were available. Also adding some memory debugging tools I added to track down the recent memory bugs: - A direct debugcon::write call, for logging to the debugcon without the possible page faults with the logger. - A new vm_space::lock call, to make a page not fillable in memory debugging mode - A mode in heap_allocator to always alloc new pages, and lock freed pages to cause page faults for use-after-free bugs. - Logging in kobject on creation and deletion - Page table cache structs are now page-sized for easy pointer math
This commit is contained in:
@@ -26,6 +26,20 @@ namespace {
|
||||
}
|
||||
} // anon namespace
|
||||
|
||||
void
|
||||
write(const char *fmt, ...)
|
||||
{
|
||||
char buffer[256];
|
||||
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
size_t n = util::vformat({buffer, sizeof(buffer)}, fmt, va);
|
||||
va_end(va);
|
||||
|
||||
debug_out(buffer, n);
|
||||
debug_out("\r\n", 2);
|
||||
}
|
||||
|
||||
void
|
||||
output(j6_log_entry *entry)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user