summaryrefslogtreecommitdiff
path: root/Kernel/Heap
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-14 09:30:31 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-14 09:36:58 +0100
commitb712345c922cfd32e7ec971f817af97ca7ee7ab4 (patch)
treec8cbfe3b0e281b603cfae05f5b0abb87b53e3776 /Kernel/Heap
parentc598a95b1c3b66cf1029eac2bcd88288c1fdb05f (diff)
downloadserenity-b712345c922cfd32e7ec971f817af97ca7ee7ab4.zip
Kernel: Use PANIC() in a bunch of places :^)
Diffstat (limited to 'Kernel/Heap')
-rw-r--r--Kernel/Heap/kmalloc.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp
index 0e81d4836f..a06fa8e582 100644
--- a/Kernel/Heap/kmalloc.cpp
+++ b/Kernel/Heap/kmalloc.cpp
@@ -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;