calloc() implementation question

Carlos O'Donell carlos@redhat.com
Thu Dec 12 18:20:00 GMT 2013


On 12/12/2013 01:45 AM, Olivier Langlois wrote:
> Hi,
> 
> Just by inspecting the code, there is something that I do not find
> obvious.
> 
> nclears variable values distribution must have been analyzed and
> everything must have been carefully balanced
> 
> if nclears is often <= 9 is it better to evaluate nclears up to 4 times
> rather than unconditionally use memset() for any value of nclears?

I don't have an answer for that.

The workloads under which malloc was tuned were never documented.

We have a plan to start doing that documentation such that we can
answer your question.

At the moment I don't think we have a good answer.

Cheers,
Carlos.



More information about the Libc-alpha mailing list