apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bp...@pacbell.net>
Subject [PATCH] mmap_setaside (with apr_mmap_dup)
Date Thu, 15 Nov 2001 06:05:18 GMT
Based on Cliff's suggestion, this patch introduces an apr_mmap_dup()
function that's used to setaside mmap buckets without having to
memcpy the content.

I gave up trying to do full reference counting semantics for
duplicates of apr_mmap_t, because I couldn't find a suitable
pool to own the locks that would be required in a threaded
implementation.  Instead, apr_mmap_dup() lets the caller
specify which of the two apr_mmap_t structs--the original one
or the new one--is the owner of the mmap (and is responsible
for destroying it).  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


View raw message