[PATCH v2 3/4] malloc: Don't statically initialize av_ if using malloc_init

Simon Glass sjg at chromium.org
Wed Aug 9 04:03:57 CEST 2023


On Tue, 8 Aug 2023 at 16:53, Sean Anderson <sean.anderson at seco.com> wrote:
>
> When we enable malloc_init, there is no need to statically initialize
> av_, since we are going to do it manually. This lets us move av_ to
> .bss, saving around 1-2k of data (depending on the pointer size).
>
> cALLOc must be adjusted to not access top before malloc_init.
>
> While we're at it, rename/reword the Kconfig to better describe what
> this option does.
>
> Signed-off-by: Sean Anderson <sean.anderson at seco.com>
> ---
>
> Changes in v2:
> - Fix cALLOc condition
>
>  Kconfig           | 18 +++++++-----------
>  common/dlmalloc.c |  9 +++++++--
>  2 files changed, 14 insertions(+), 13 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list