apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Marr <gr...@alum.wpi.edu>
Subject Re: cvs commit: apr-util/buckets apr_buckets_mmap.c
Date Tue, 26 Jun 2001 17:33:25 GMT
At 12:53 PM 06/26/2001, Greg Marr wrote:
>At 12:05 PM 06/26/2001, Cliff Woolley wrote:
>>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.
>
>Why not simply reference count the MMAP/file handle?

I came up with these questions after sending this suggestion:

Where would the reference count go?
  - Instead of having an MMAP/file handle, the apr_*_t would have to 
point to a structure containing the MMAP/file handle, and a reference 
count.  This memory for this structure could not come from any pool 
with a shorter lifetime than the server itself.  It would likely have 
to be directly apr_malloc'ed.

What about locking?
  - For setaside, there should be no other threads knowing about the 
buckets.  The bucket data is just moved to another lifetime, not 
another thread.  As long as the apr type isn't given to another 
thread, there should be no locking issues.


-- 
Greg Marr
gregm@alum.wpi.edu
"We thought you were dead."
"I was, but I'm better now." - Sheridan, "The Summoning"


Mime
View raw message