1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

Kernel: Use PANIC() in a bunch of places :^)

This commit is contained in:
Andreas Kling 2021-02-14 09:30:31 +01:00
parent c598a95b1c
commit b712345c92
8 changed files with 26 additions and 42 deletions

View file

@ -38,6 +38,7 @@
#include <Kernel/Heap/Heap.h>
#include <Kernel/Heap/kmalloc.h>
#include <Kernel/KSyms.h>
#include <Kernel/Panic.h>
#include <Kernel/Process.h>
#include <Kernel/Scheduler.h>
#include <Kernel/SpinLock.h>
@ -247,9 +248,7 @@ void* kmalloc_impl(size_t size)
void* ptr = g_kmalloc_global->m_heap.allocate(size);
if (!ptr) {
klog() << "kmalloc(): PANIC! Out of memory (no suitable block for size " << size << ")";
Kernel::dump_backtrace();
Processor::halt();
PANIC("kmalloc: Out of memory (requested size: {})");
}
return ptr;