]> Git Repo - J-u-boot.git/commitdiff
malloc: Show amount of used space when memory runs out
authorSimon Glass <[email protected]>
Sat, 7 Dec 2024 17:23:59 +0000 (10:23 -0700)
committerTom Rini <[email protected]>
Thu, 12 Dec 2024 22:35:23 +0000 (16:35 -0600)
Show a bit more information when malloc() space is exhausted and
debugging is enabled.

Signed-off-by: Simon Glass <[email protected]>
common/malloc_simple.c

index 5a8ec538f8ff27389be710a02c3ca88a4ee67642..f0f90a095bd162c245a5c2b2f054b058846c2f4d 100644 (file)
@@ -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;
        }
 
This page took 0.027343 seconds and 4 git commands to generate.