Hi Vincent, On Wed, Jul 24, 2013 at 09:38:36PM +0200, Vincent Bernat wrote: > ??? 24 juillet 2013 11:07 CEST, Willy Tarreau <w...@1wt.eu> : > > > Indeed. I have no idea why we're observing these differences, and I > > don't know if the libc uses heuristics to decide to memset() the > > area or not. > > Unless there is an alternative malloc hooked, the libc heavily relies on > the fact that the kernel will force to zero the memory it allocates > through mmap. However, when recycling, it will memset the area.
That was my first guess but this is not what we're observing with Godbach's test program, which confuses both of us. So maybe the libc verifies that the kernel properly zeroes the mmaped area on the first call and then happily ignores it on subsequent calls, or something like this, I have no idea honnestly. Best regards, Willy