On Wed, Jul 24, 2013 at 04:58:31PM +0800, Godbach wrote: > The mechanism of poisoning/memset is used for memory pool. Memory pool > uses MALLOC in dev7 and CALLOC in master, most chunks of memory are > allocated from memory pool while processing sessions. But what we have > talked about is memory usage which is allocated directly by calloc() > during startup with almost no session.
I agree, but I thought that the difference could lie in *some* of the pools being used. That said if this is just upon startup, I agree that the pools should be empty and thus cannot explain the difference. > So it seems that the memory usage we talk about here should not be > related to this mechanism in my opinion. 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. I think we'd better define a zalloc() function aimed at replacing calloc() and which would always clear the area, than rely on some random behaviour we have no control over. Willy