Commit 09b10d93ef36afad0ff1cb679f38dd0017334a10
Committed by
Lokesh Vutla
1 parent
e54c8b349c
Exists in
v2017.01-smarct4x
and in
2 other branches
malloc_simple: Add debug statements to memalign_simple
commit 1923d54bfc2261948448a821d284f10566fde7fe upstream. Add debug statements to memalign_simple to match malloc_simple. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Showing 1 changed file with 5 additions and 1 deletions Side-by-side Diff
common/malloc_simple.c
... | ... | @@ -39,10 +39,14 @@ |
39 | 39 | |
40 | 40 | addr = ALIGN(gd->malloc_base + gd->malloc_ptr, align); |
41 | 41 | new_ptr = addr + bytes - gd->malloc_base; |
42 | - if (new_ptr > gd->malloc_limit) | |
42 | + if (new_ptr > gd->malloc_limit) { | |
43 | + debug("space exhausted\n"); | |
43 | 44 | return NULL; |
45 | + } | |
46 | + | |
44 | 47 | ptr = map_sysmem(addr, bytes); |
45 | 48 | gd->malloc_ptr = ALIGN(new_ptr, sizeof(new_ptr)); |
49 | + debug("%lx\n", (ulong)ptr); | |
46 | 50 | |
47 | 51 | return ptr; |
48 | 52 | } |