malloc: Switch to the new malloc() implementation

Add CONFIG_SYS_MALLOC_LEGACY to select the current allocator and adjust
the header-file and Makefile rule to use the new dlmalloc
implementation.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-11-28 16:37:04 -07:00
parent 13197ab962
commit 7eeb099ae1
3 changed files with 27 additions and 12 deletions

View File

@@ -71,7 +71,11 @@ obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
obj-$(CONFIG_$(PHASE_)SERIAL) += console.o
obj-$(CONFIG_CROS_EC) += cros_ec.o
ifdef CONFIG_SYS_MALLOC_LEGACY
obj-y += dlmalloc_old.o
else
obj-y += dlmalloc.o
endif
obj-$(CONFIG_$(PHASE_)SYS_MALLOC_F) += malloc_simple.o
obj-$(CONFIG_$(PHASE_)CYCLIC) += cyclic.o