From: "Mladen Turk" <[EMAIL PROTECTED]> Sent: Thursday, September 02, 2004 9:31 AM
> William A. Rowe, Jr. wrote: > > > > > Yes - httpd tends to perform a rather small number of malloc/free > > operations - well, if you aren't using some add-in modules such > > as svn which have more atomic memory units to free up. > > > >>Sorry for the noise :) > > > > I don't consider it noise. Please don't dismiss this patch > > soely on the basis that it offers small benefit to httpd. There > > are other applications that rely on APR, I'd love to see the > > concept of this patch incorporated. > > Well, it was just to prove the possibility of such approach. > Using heaps just to replace the malloc/free wouldn't be much, > if we don't use all the heap memory benefits. I was wondering about that. So basically you have to implement the pools API on top of heaps, to get some real benefit. > The heaps itself are pretty much like pools, and with XP+ you > can even have a low fragmentation heaps, that can be used > directly to the palloc calls, without the need to maintain the > memory node list. Each pool can have it's own heap with the > allocator maintaining that heap list. > > Would something like 'memory/win32/apr_pools.c' be possible? I don't see why not. It is certainly better than decorating the code with #if ... #endif blocks, if those basically replace entire function implementations. Sander
