> In fact, can recallocarray be faster than plain free followed by calloc?

Yes.

I think you are missing some nuances.  These added functions have fast paths
and slow paths.  freezero() isn't just a bzero, it also has munmap()
sequences.  You are adding forced bzero or munmap() in circumstances
where previously a malloc implementation could keep the freed'd memory in
a cache for reuse.

I find it hard to read your diff as convert other than "convert all free
operations to freezero", or always pay the cost no matter what.

You could compare make build times.  I suspect this will slightly
exceed the noise floor.

Reply via email to