From 9703c9cc30cc47c2488a190a93b9603c08f368ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 26 Oct 2013 18:41:57 +0200 Subject: [PATCH] bootloader: Add tracing to malloc_large() --- src/system/boot/loader/heap.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/system/boot/loader/heap.cpp b/src/system/boot/loader/heap.cpp index 7fc9e40ed8..dcf32696df 100644 --- a/src/system/boot/loader/heap.cpp +++ b/src/system/boot/loader/heap.cpp @@ -261,15 +261,19 @@ static void* malloc_large(size_t size) { LargeAllocation* allocation = new(std::nothrow) LargeAllocation; - if (allocation == NULL) + if (allocation == NULL) { + dprintf("malloc_large(): Out of memory!\n"); return NULL; + } if (allocation->Allocate(size) != B_OK) { + dprintf("malloc_large(): Out of memory!\n"); delete allocation; return NULL; } sLargeAllocations.InsertUnchecked(allocation); + TRACE("malloc_large(%lu) -> %p\n", size, allocation->Address()); return allocation->Address(); }