This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] calloc should not duplicate malloc logic.

On Wed, Feb 26, 2014 at 10:21:23PM +0530, Siddhesh Poyarekar wrote:
> On Wed, Feb 26, 2014 at 05:25:21PM +0100, OndÅej BÃlka wrote:
> > Siddhesh, before you speak you need check the facts. Use a benchmark
> > so you could quantify if it is worth of concern or difference will just 
> > disappear in noise.
> You're posting a patch and also admitting to a performance regression.
> I'm not sure why you think I should spend my time writing a benchmark
> to refute your patch.
I did not said so, I said there could be minor regression and asked if
that is problem. Also there is problem of synchronization as independent
modifications would conflict and I want minimize these issue before they
> > Siddhesh a following program already consumes a gigabyte in rss so your
> > claim is nonsense again.
> > 
> > #include <malloc.h>
> > int main()
> > {
> >   char *x = calloc (1000000000,1);
> >   sleep(1000);
> > }
> You haven't understood why this is a bad idea.  The pages will have
> been zeroed twice with your patch, once by mmap and again with memset.
I understood you perfecly and you are wrong here. Current implementation
also zeroes memory twice as this example demonstrates. Your point is
invalid here.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]