On Wed, Oct 24, 2001 at 07:04:07PM -0700, Sunitha Kumar wrote: > Wanted to find out if there was any thread or documentation which speak > about this. > Also, the apache documentation refers to an alloc.c file. Where is this? > > And, what are the tools that people have used for tracking leaks, > Efence, zmalloc, dmalloc, purify?
That's actually a difficult question to answer with Apache. Because it uses pools almost exclusively (there are some places that use malloc, but they are special cases) it usually becomes obvious very quickly if there is a memory leak problem. Pools, if you are not familiar with them, basicly allow us to "checkpoint" memory de-allocations at certain points in our code, instead of having to call free() for every malloc(). This gives us a couple of benefits: 1) memory management overhead is dramatically reduced (O(n) free() calls vs O(1), plus free-list management overhead with increased fragmentation), and 2) third-party modules that use pools can perform safe memory allocations and don't have to worry about cleaning up. It is still possible for memory leaks to occur, but the likelyhood of a slow leak is IMO reduced with the use of pools. Are you having a specific problem that we might address? -aaron
