[musl] Re: realloci(): A realloc() variant that works in-place

Thorsten Glaser tg@mirbsd.de
Sat Nov 1 19:38:20 GMT 2025


On Sat, 1 Nov 2025, Laurent Bercot wrote:

>> Where realloci() allocates at least 'size' bytes (but possibly more),
>> and returns the actual usable size of the block.
>
> If you're set on doing something like this, it would be simpler to
> provide a function that just returns the usable size of the block,
> under which realloc() is guaranteed not to relocate the object, and
> above which it is guaranteed to relocate.

The size of that block may depend on the size requested (and possibly
the availability at the time of requesting), so… no, not really simpler.

bye,
//mirabilos
-- 
When he found out that the m68k port was in a pretty bad shape, he did
not, like many before him, shrug and move on; instead, he took it upon
himself to start compiling things, just so he could compile his shell.
How's that for dedication. -- Wouter, about my Debian/m68k revival


More information about the Libc-alpha mailing list