diff options
| author | Simon Glass <[email protected]> | 2024-12-07 10:23:59 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-12-12 16:35:23 -0600 |
| commit | 3f1167fd0008fdc859318ced2c0140866d564a4a (patch) | |
| tree | 2a059a2574ff09a0531fa9321536f0dd35384e0b /common/malloc_simple.c | |
| parent | a03793a3c7ae5eb83eab29f6d701926f8eb07d1e (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 <[email protected]>
Diffstat (limited to 'common/malloc_simple.c')
| -rw-r--r-- | common/malloc_simple.c | 3 |
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; } |
