summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-12-19 11:28:54 -0700
committerTom Rini <trini@konsulko.com>2024-12-27 15:16:10 -0600
commitc44c83f1fbddf47c81ff4e686f450b7e050dad01 (patch)
tree488b4dffd434d09ac70979b27d190243b757f4ed
parent4702647528710a82d71ee9fd4d24273aefdda2a0 (diff)
malloc: Show amount of used space when memory runs out
Show a bit more information when malloc() space is exhausted and debugging is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--common/malloc_simple.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/malloc_simple.c b/common/malloc_simple.c
index 5a8ec538f8f..f0f90a095bd 100644
--- a/common/malloc_simple.c
+++ b/common/malloc_simple.c
@@ -26,7 +26,8 @@ static void *alloc_simple(size_t bytes, int align)
log_debug("size=%lx, ptr=%lx, limit=%x: ", (ulong)bytes, new_ptr,
gd->malloc_limit);
if (new_ptr > gd->malloc_limit) {
- log_err("alloc space exhausted\n");
+ log_err("alloc space exhausted ptr %lx limit %x\n", new_ptr,
+ gd->malloc_limit);
return NULL;
}