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_mmap.c
Date Tue, 26 Jun 2001 16:05:55 GMT
On Tue, 26 Jun 2001, Cliff Woolley wrote:

> > Your right, this can do that.  However, we really can't keep that from
> > happening.  In reality, the mmap_setaside function should just map it back
> > to a file opened out of the new pool.
>
> Hmmm... why's that?  Once the file is MMAPed, you don't even need the
> original file to be open anymore (you don't have a reference to it
> anyhow).  The OS's MMAP doesn't know anything about pools, so all we
> have to do is transfer the apr_mmap_t structure itself over to a new
> pool and we're done.  What am I missing?

Obviously I was missing the same thing as I was missing on the
file_cleanup() thing, which is the simple fact that the original MMAP
might get deleted by the pool cleanup on the old pool.  I don't know where
my brain is today.

Anyway, the problem is not 100% solved.  We need to make ourselves a new
MMAP to the file that we know won't get deleted.  But to do that we need
the original apr_file_t, which we don't have, and which might not even be
open anymore.  Hmmm... tricky...  What do we do, store the file path in
the apr_mmap_t and reopen it?  Bleh, that's ugly...

--Cliff


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




Mime
View raw message