> From: Cliff Woolley [mailto:[EMAIL PROTECTED]] > Sent: 18 April 2002 22:43 > To: [EMAIL PROTECTED] > Subject: [PATCH (w/caveats)] mmap cleanup issue > > Attached is a patch for the mmap bucket cleanup issue. The caveats are > that it only works if: > > - if the apr_mmap_t passed to apr_bucket_mmap_create/make is the owner of > the mmaped region, the mmap buckets code assumes complete > responsibility for it. In particular, external code should NEVER call > apr_mmap_delete or apr_mmap_dup (transferring ownership) on that > apr_mmap_t after it's been placed in the bucket. > > - if the apr_mmap_t passed to apr_bucket_mmap_create/make is NOT the > owner of the mmaped region, then the creator of the bucket is > absolutely guaranteeing us that the apr_mmap_t will live longer than > the bucket.
Maybe asking the obvious here, but can't we solve this with a simple reference counter? IOW last one destroys the mmap. Sander
