apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject Re: [Fwd: Re: Making pool 3 times faster on WIN32]
Date Thu, 02 Sep 2004 07:53:23 GMT
From: "Mladen Turk" <mturk@apache.org>
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

Mime
View raw message