Skip to content
Commit 420bf1e4 authored by Keith Packard's avatar Keith Packard Committed by Stephanos Ioannidis
Browse files

libc/common: Change how legacy malloc setting works



Change the default value of MINIMAL_LIBC_MALLOC_ARENA_SIZE from 0 to an
otherwise invalid value of -2. This allows the common malloc code to
distinguish between an application which explicitly sets the malloc arena
to zero bytes from an application which does not set the variable at all.

When MINIMAL_LIBC_MALLOC_ARENA_SIZE is set to a value other than -2, then
*always* set COMMON_LIBC_MALLOC_ARENA_SIZE to that value. Emit a compile
warning to let the developer know that their application is using a
deprecated Kconfig variable.

This means that MINIMAL_LIBC_MALLOC_ARENA_SIZE now always overrides
COMMON_LIBC_MALLOC_ARENA_SIZE, but an application setting both will already
be getting a configuration warning for setting the DEPRECATED value
anyways, which should serve as an adequate indication to the user.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent 32a437cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment