summaryrefslogtreecommitdiff
path: root/Kernel/Heap/kmalloc.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-02-05 15:43:02 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-05 22:50:39 +0100
commit1d411a46c19149086d34f15d59c8c370bf558e87 (patch)
treef4142e31f2441920eecfccbd3777df2f25166ec1 /Kernel/Heap/kmalloc.cpp
parent04bec7a4f53ecd13673d6ea1acdb172abadc4b2c (diff)
downloadserenity-1d411a46c19149086d34f15d59c8c370bf558e87.zip
Kernel: Put kmalloc heap expansion debug spam behind KMALLOC_DEBUG
Diffstat (limited to 'Kernel/Heap/kmalloc.cpp')
-rw-r--r--Kernel/Heap/kmalloc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp
index 07be704328..654d288069 100644
--- a/Kernel/Heap/kmalloc.cpp
+++ b/Kernel/Heap/kmalloc.cpp
@@ -184,7 +184,7 @@ struct KmallocGlobalData {
void add_subheap(u8* storage, size_t storage_size)
{
- dbgln("Adding kmalloc subheap @ {} with size {}", storage, storage_size);
+ dbgln_if(KMALLOC_DEBUG, "Adding kmalloc subheap @ {} with size {}", storage, storage_size);
static_assert(sizeof(KmallocSubheap) <= PAGE_SIZE);
auto* subheap = new (storage) KmallocSubheap(storage + PAGE_SIZE, storage_size - PAGE_SIZE);
subheaps.append(*subheap);
@@ -269,7 +269,7 @@ struct KmallocGlobalData {
}
size_t new_subheap_size = max(minimum_subheap_size, rounded_allocation_request.value());
- dbgln("Unable to allocate {}, expanding kmalloc heap", allocation_request);
+ dbgln_if(KMALLOC_DEBUG, "Unable to allocate {}, expanding kmalloc heap", allocation_request);
if (!expansion_data->virtual_range.contains(new_subheap_base, new_subheap_size)) {
// FIXME: Dare to return false and allow kmalloc() to fail!