apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: cvs commit: apr-util/buckets apr_buckets_file.c
Date Wed, 28 Nov 2001 00:25:05 GMT
On Tue, 27 Nov 2001, Doug MacEachern wrote:

> On Tue, 27 Nov 2001, Cliff Woolley wrote:
>
> > +1 on concept, but if you're going to do this, the things need APR_
> > namespace protection.
>
> ok, wasn't sure if those values might already be defined in a system
> header file.  if so, then i'll change to:

I can't find them in the headers on any of my systems... I had just
assumed the were #ifdef'ed to allow overriding by the user.  But hey,
whatever... what you have below is probably good anyhow.

> #ifdef MMAP_THRESHOLD
> #  define APR_MMAP_THRESHOLD MMAP_THRESHOLD
> #else
> #  ifdef SUNOS4
> #    define APR_MMAP_THRESHOLD                (8*1024)
> #  else
> #    define APR_MMAP_THRESHOLD                1
> #  endif /* SUNOS4 */
> #endif /* MMAP_THRESHOLD */

By the way I'm suspecting the fact that we have APR_MMAP_THRESHOLD
defaulting to _1 byte_ is bad.  mmap() is probably much too expensive on
many systems to justify that.  That's just a hunch, but the threshold we
want is really probably significantly higher than one byte.  It's a good
spot for some per-platform performance tuning, at least.  I'd guess it
probably shouldn't go above what we're willing to use as
APR_BUCKET_BUFF_SIZE (currently 8KB), but even that is debatable.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message