diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-05 15:43:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-05 22:50:39 +0100 |
commit | 1d411a46c19149086d34f15d59c8c370bf558e87 (patch) | |
tree | f4142e31f2441920eecfccbd3777df2f25166ec1 | |
parent | 04bec7a4f53ecd13673d6ea1acdb172abadc4b2c (diff) | |
download | serenity-1d411a46c19149086d34f15d59c8c370bf558e87.zip |
Kernel: Put kmalloc heap expansion debug spam behind KMALLOC_DEBUG
-rw-r--r-- | Kernel/Heap/kmalloc.cpp | 4 |
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! |