diff options
author | ianh <ianh@13f79535-47bb-0310-9956-ffa450edef68> | 2001-11-21 17:00:51 +0000 |
---|---|---|
committer | ianh <ianh@13f79535-47bb-0310-9956-ffa450edef68> | 2001-11-21 17:00:51 +0000 |
commit | b9df8a1f56cf15f308fc51c0ecfb9e1b78f9ec71 (patch) | |
tree | 93573510799a96951829f26a83b2f873e6217398 /include/apr_mmap.h | |
parent | 0b4f614e253482f8920aca445acd54aa10441251 (diff) | |
download | libapr-b9df8a1f56cf15f308fc51c0ecfb9e1b78f9ec71.tar.gz |
New APR function apr_mmap_dup.
this is used in the MMAP bucket setaside function for a performance win.
Mod_file_cache will also use this
Submitted by: Brian Pane <bpane@pacbell.net>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62536 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_mmap.h')
-rw-r--r-- | include/apr_mmap.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/apr_mmap.h b/include/apr_mmap.h index 6edceaa0d..17cbab343 100644 --- a/include/apr_mmap.h +++ b/include/apr_mmap.h @@ -111,6 +111,8 @@ struct apr_mmap_t { void *mm; /** The amount of data in the mmap */ apr_size_t size; + /** Whether this object is reponsible for doing the munmap */ + int is_owner; }; #if APR_HAS_MMAP || defined(DOXYGEN) @@ -136,6 +138,19 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **newmmap, apr_pool_t *cntxt); /** + * Duplicate the specified MMAP. + * @param new_mmap The structure to duplicate into. + * @param old_mmap The file to duplicate. + * @param p The pool to use for the new file. + * @param transfer_ownership Whether responsibility for destroying + * the memory-mapped segment is transferred from old_mmap to new_mmap + */ +APR_DECLARE(apr_status_t) apr_mmap_dup(apr_mmap_t **new_mmap, + apr_mmap_t *old_mmap, + apr_pool_t *p, + int transfer_ownership); + +/** * Remove a mmap'ed. * @param mmap The mmap'ed file. */ |