apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bp...@pacbell.net>
Subject Re: [PATCH] mmap_setaside (with apr_mmap_dup)
Date Thu, 15 Nov 2001 06:57:59 GMT
Cliff Woolley wrote:

>>The patch includes a change to mod_file_cache to create a non-owner
>>copy of the mmap for the bucket brigade to use, so that the mmap can't
>>get unmapped by any code other than mod_file_cache itself
>Why is that necessary?  The original mmap from mod_file_cache is owned by
>mod_file_cache and is allocated out of cmd->pool.  cmd->pool definitely
>lives longer than r->pool.  I guess the problem is that cmd->pool is not
>an ancestor of r->pool, right?  It's disjoint (kind of a great-uncle or
>something ;).  FEH.  Is there some clean way we can allocate the mmap out
>of a better pool than the cmd->pool [like pchild or something]?  The less
>work we do at request time, the better.  I guess this wouldn't be the end
>of the world, though.

Right, it's because the original mmap comes from a disjoint pool that
we need to make the non-owner copy at request time.  Allocating the cached
mmap structs from pchild probably would eliminate the need for this.  But
it's most likely not worth the effort, because the copy is a relatively
lightweight operation.


View raw message