[RFC PATCH] realloc: Make REALLOC_ZERO_BYTES_FREES into a tunable

Andreas Schwab schwab@suse.de
Tue Oct 22 08:26:37 GMT 2024


On Okt 18 2024, Siddhesh Poyarekar wrote:

> Allow users to select this behaviour at runtime, which should allow them
> flexibility to have glibc realloc do the same thing that many other
> implementations do for realloc (p, 0).  The default behaviour remains
> unchanged for now.

That doesn't make sense.  The required behaviour of realloc (p, 0) is a
static, compile-time property of the program, so it needs to be
controlled at compile time.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


More information about the Libc-alpha mailing list