[PATCH 0/3] malloc: Reduce size by initializing data at runtime

Sean Anderson sean.anderson at seco.com
Tue Aug 1 00:33:24 CEST 2023


In my efforts to get SPL to fit into flash after some changes I made, I
noticed that av_ is one of the largest variables in SPL. As it turns
out, we can generate it at runtime, and the code is already there. This
has the potential to save 1-2k across the board, for some minor boot
time increase.


Sean Anderson (3):
  malloc: Don't use ifdefs for SYS_MALLOC_DEFAULT_TO_INIT
  malloc: Don't statically initialize av_ if using malloc_init
  malloc: Enable SYS_MALLOC_RUNTIME_INIT by default in SPL

 Kconfig           | 27 +++++++++++++++++----------
 common/dlmalloc.c | 16 ++++++++--------
 2 files changed, 25 insertions(+), 18 deletions(-)

-- 
2.40.1



More information about the U-Boot mailing list