This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: calloc() implementation question
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Olivier Langlois <olivier at trillion01 dot com>, libc-alpha at sourceware dot org
- Date: Thu, 12 Dec 2013 12:37:19 -0500
- Subject: Re: calloc() implementation question
- Authentication-results: sourceware.org; auth=none
- References: <1386830712 dot 753 dot 25 dot camel at Wailaba2>
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.