Handwaving RFC: hypothetical recalloc() API
Cristian Rodriguez
yo@cristianrodriguez.net
Mon May 4 20:14:22 GMT 2026
On Mon, May 4, 2026 at 1:37 PM H. Peter Anvin <hpa@zytor.com> wrote:
> 1. memory allocated from the operating system is already clear, and explicitly
> zeroing it userspace causes it to be COW'd even when unnecessary --
> unless the existing malloc(), realloc() etc. functions are modified to
> always clear any spillover area (the difference between the buffer requested
> and the buffer allocated)
This wouldn't be the end of the world, would it? I'd bet the overhead
is minuscule.
and worth it..
More information about the Libc-alpha
mailing list