From 3f1167fd0008fdc859318ced2c0140866d564a4a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 7 Dec 2024 10:23:59 -0700 Subject: 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 --- common/malloc_simple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/malloc_simple.c') 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; } -- cgit v1.2.3 From a33185173dce550d6ecb96b7fa625bb5e2183d66 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 12 Dec 2024 21:07:26 -0600 Subject: Revert "Merge patch series "vbe: Series part E"" This reverts commit 1fdf53ace13f745fe8ad4d2d4e79eed98088d555, reversing changes made to e5aef1bbf11412eebd4c242b46adff5301353c30. I had missed that this caused too much size growth on rcar3_salvator-x. Signed-off-by: Tom Rini --- common/malloc_simple.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'common/malloc_simple.c') diff --git a/common/malloc_simple.c b/common/malloc_simple.c index f0f90a095bd..5a8ec538f8f 100644 --- a/common/malloc_simple.c +++ b/common/malloc_simple.c @@ -26,8 +26,7 @@ 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 ptr %lx limit %x\n", new_ptr, - gd->malloc_limit); + log_err("alloc space exhausted\n"); return NULL; } -- cgit v1.2.3 From c44c83f1fbddf47c81ff4e686f450b7e050dad01 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 19 Dec 2024 11:28:54 -0700 Subject: 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 --- common/malloc_simple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/malloc_simple.c') 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; } -- cgit v1.2.3