Files
u-boot/common
Simon Glass 319350496b malloc: Add NO_REALLOC_IN_PLACE option to reduce code size
Add a new NO_REALLOC_IN_PLACE option that disables in-place realloc
optimization. When enabled via CONFIG_SYS_MALLOC_SMALL, realloc() always
allocates new memory, copies data, and frees the old block instead of
trying to extend the existing allocation.

This saves about 500 bytes by eliminating try_realloc_chunk() and
mmap_resize() functions.

When unit tests are enabled, the extra realloc logic is included.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-01 16:57:15 +00:00
..
2025-11-12 08:40:05 -07:00
2025-12-01 15:57:27 +00:00