[PATCH] malloc: add free_sized and free_aligned_sized from C23

Joseph Myers josmyers@redhat.com
Wed Jun 18 20:50:26 GMT 2025


On Wed, 18 Jun 2025, Florian Weimer wrote:

> I realized that we probably have another gap: Can a pointer returned
> from strdup and strndup be used with free_sized, and what should be size
> to pass?  Is this aspect covered in the C23 standard?  If the language

That's a question I noted in WG14 reflector message 20291 (1 Sep 2021; 
answered in message 20293): since the size used by strdup and strndup is 
not specified in the standard, pointers returned by those functions can't 
be passed to free_sized.

-- 
Joseph S. Myers
josmyers@redhat.com



More information about the Libc-alpha mailing list