Add a kmalloc_eternal() for things that will never be destroyed.

This commit is contained in:
Andreas Kling 2018-10-31 23:19:15 +01:00
commit 9a086b2d35
Notes: sideshowbarker 2024-07-19 18:35:26 +09:00
20 changed files with 85 additions and 20 deletions

View file

@ -174,7 +174,7 @@ ByteBuffer procfs$kmalloc()
InterruptDisabler disabler;
auto buffer = ByteBuffer::createUninitialized(128);
char* ptr = (char*)buffer.pointer();
ptr += ksprintf(ptr, "alloc: %u\nfree: %u\n", sum_alloc, sum_free);
ptr += ksprintf(ptr, "eternal: %u\nallocated: %u\nfree: %u\n", kmalloc_sum_eternal, sum_alloc, sum_free);
buffer.trim(ptr - (char*)buffer.pointer());
return buffer;
}