mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-11 07:24:46 +00:00
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>
This commit is contained in:
parent
4702647528
commit
c44c83f1fb
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue