From: Simon Glass <simon.glass@canonical.com> Enable INSECURE=1 to skip runtime heap validation checks (except for sandbox), and NO_MALLINFO=1 to remove mallinfo support (except when unit tests are enabled). These reduce code size significantly. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- common/dlmalloc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 98de6523758..268d3fea52a 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -563,6 +563,14 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP #define NO_MALLOC_STATS 1 #define USE_LOCKS 0 #define USE_SPIN_LOCKS 0 + +#if !CONFIG_IS_ENABLED(UNIT_TEST) +#define NO_MALLINFO 1 +#endif +#if !CONFIG_IS_ENABLED(SANDBOX) +#define INSECURE 1 +#endif + #define MALLOC_FAILURE_ACTION #define ABORT do {} while (1) -- 2.43.0