|
@@ -99,14 +99,14 @@ void* kmalloc_impl(size_t size)
|
|
|
|
|
|
if (g_dump_kmalloc_stacks && ksyms_ready) {
|
|
if (g_dump_kmalloc_stacks && ksyms_ready) {
|
|
dbgprintf("kmalloc(%u)\n", size);
|
|
dbgprintf("kmalloc(%u)\n", size);
|
|
- dump_backtrace(true);
|
|
|
|
|
|
+ dump_backtrace();
|
|
}
|
|
}
|
|
|
|
|
|
// We need space for the allocation_t structure at the head of the block.
|
|
// We need space for the allocation_t structure at the head of the block.
|
|
size_t real_size = size + sizeof(allocation_t);
|
|
size_t real_size = size + sizeof(allocation_t);
|
|
|
|
|
|
if (sum_free < real_size) {
|
|
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);
|
|
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();
|
|
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);
|
|
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();
|
|
hang();
|
|
}
|
|
}
|
|
|
|
|