mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
spl: add debug print for early malloc usage
To find out how big the early malloc heap must be in SPL, add a debug print statement that dumps its usage before switching to relocated heap in spl_relocate_stack_gd() via CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
This commit is contained in:
parent
8422ad5165
commit
438dcabb75
1 changed files with 2 additions and 0 deletions
|
@ -728,6 +728,8 @@ ulong spl_relocate_stack_gd(void)
|
|||
|
||||
#if defined(CONFIG_SPL_SYS_MALLOC_SIMPLE) && CONFIG_VAL(SYS_MALLOC_F_LEN)
|
||||
if (CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN) {
|
||||
debug("SPL malloc() before relocation used 0x%lx bytes (%ld KB)\n",
|
||||
gd->malloc_ptr, gd->malloc_ptr / 1024);
|
||||
ptr -= CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN;
|
||||
gd->malloc_base = ptr;
|
||||
gd->malloc_limit = CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN;
|
||||
|
|
Loading…
Add table
Reference in a new issue