mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:45:06 +00:00
Kernel: Simplify dump_backtrace() API for clients.
It makes no sense that clients had to worry about whether or not KSyms were loaded.
This commit is contained in:
parent
7a2da54c07
commit
2f4e7edee5
6 changed files with 10 additions and 11 deletions
|
@ -99,14 +99,14 @@ void* kmalloc_impl(size_t size)
|
|||
|
||||
if (g_dump_kmalloc_stacks && ksyms_ready) {
|
||||
dbgprintf("kmalloc(%u)\n", size);
|
||||
dump_backtrace(true);
|
||||
dump_backtrace();
|
||||
}
|
||||
|
||||
// We need space for the allocation_t structure at the head of the block.
|
||||
size_t real_size = size + sizeof(allocation_t);
|
||||
|
||||
if (sum_free < real_size) {
|
||||
dump_backtrace(ksyms_ready);
|
||||
dump_backtrace();
|
||||
kprintf("%s(%u) kmalloc(): PANIC! Out of memory (sucks, dude)\nsum_free=%u, real_size=%u\n", current->process().name().characters(), current->pid(), sum_free, real_size);
|
||||
hang();
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ void* kmalloc_impl(size_t size)
|
|||
}
|
||||
|
||||
kprintf("%s(%u) kmalloc(): PANIC! Out of memory (no suitable block for size %u)\n", current->process().name().characters(), current->pid(), size);
|
||||
dump_backtrace(ksyms_ready);
|
||||
dump_backtrace();
|
||||
hang();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue