On Thu, 18 Apr 2002, Brian Pane wrote:

> Forgive me if this has been considered already (I haven't had time
> to keep up with the mmap issues), but why not create a variant of
> apr_mmap_dup() that allocates space for a new apr_mmap_t from the
> brigade's bucket_alloc?  Then the brigade, rather than the pool,
> would control the lifetime of the dup'ed mmap.

I hadn't considered that, but I don't think it's possible anyway, for
two reasons:

 - very much of the code throughout APR, APR-util, and Apache assumes that
   the apr_mmap_t will be associated with a pool (mm->cntxt).
 - even if you modified your idea to allocate it out of the brigade's
   pool instead of the brigade's bucket_alloc, it still wouldn't work
   because buckets are not inherently tied to a single brigade; they
   can move freely from one brigade to the next.  the brigades might
   have different lifetimes.  Shorter, fine, but longer would get
   us into the same old problem.

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA


Reply via email to