[PATCH] malloc: Improve performance of __libc_calloc

Wilco Dijkstra Wilco.Dijkstra@arm.com
Wed May 14 16:49:11 GMT 2025


Hi DJ,

>> Malloc doesn't build at all with a different INTERNAL_SIZE_T. But
>> basically that would be an unchecked cast of size_t to a smaller
>> INTERNAL_SIZE_T, thus incorrectly dealing with huge user allocations.
>
> Hmm... I suspected that.  I suppose out of fairness we should decide
> "this is the way" and remove it all, but at a minimum we could just
> assert it's the same as size_t.  Not worried about it now though.

It's not unreasonable for chunk headers to be 32 bits since large sizes use
mmap anyway. However the existing code suffers from having so many
untested configuration options...

> FYI patchwork's code sees the "Re: " and assume's it's a reply to an
> existing patch; to trigger a v2 in patchwork you need to remove the Re:
> part (at least) and preferably add the [PATCH v2] in the $subject.
> Then, in patchwork, you can mark the v1 patch as superceeded and the v2
> as accepted.  I go a step further and split my reply to comments and
> updated patch into separate emails, so that the patch emails are closer
> to what's in git.

Thanks, I'll keep this in mind next time!

Cheers,
Wilco


More information about the Libc-alpha mailing list