From: Jim Jagielski Date: Wed, 31 Dec 2008 13:22:54 +0000 (+0000) Subject: Stubs for slot/shared/plain memory modules X-Git-Tag: 2.3.1~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf354d6eeac5f79d7b289743db92869296432e50;p=apache Stubs for slot/shared/plain memory modules git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730386 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_plainmem.xml b/docs/manual/mod/mod_plainmem.xml new file mode 100644 index 0000000000..1ca041cb96 --- /dev/null +++ b/docs/manual/mod/mod_plainmem.xml @@ -0,0 +1,70 @@ + + + + + + + + + +mod_plainmem +Slot-based shared memory provider. +Extension +mod_plainmem.c +plainmem_module + + +

mod_plainmem is a memory provider which + provides for creation and access to a plain memory segment + in which the datasets are organized in "slots." Although + it can be used directly, normally mod_slotmem + is used as a front-end. +

+ +

If the memory needs to be shared between threads and + processes, a better provider would be + mod_sharedmem. +

+ +

mod_plainmem provides the following + API functions: +

+ +
+
apr_status_t slotmem_do(ap_slotmem_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)
+
call the callback on all worker slots
+ +
apr_status_t slotmem_create(ap_slotmem_t **new, const char *name, apr_size_t item_size, int item_num, apr_pool_t *pool)
+
create a new slotmem with each item size is item_size.
+ +
apr_status_t slotmem_attach(ap_slotmem_t **new, const char *name, apr_size_t *item_size, int *item_num, apr_pool_t *pool)
+
attach to an existing slotmem.
+ +
apr_status_t slotmem_mem(ap_slotmem_t *s, int item_id, void**mem)
+
get the memory associated with this worker slot.
+ +
apr_status_t slotmem_lock(ap_slotmem_t *s)
+
lock the memory segment
+ +
(apr_status_t slotmem_unlock(ap_slotmem_t *s)
+
unlock the memory segment
+
+ +
+ +
diff --git a/docs/manual/mod/mod_sharedmem.xml b/docs/manual/mod/mod_sharedmem.xml new file mode 100644 index 0000000000..cb8dc8d1ec --- /dev/null +++ b/docs/manual/mod/mod_sharedmem.xml @@ -0,0 +1,65 @@ + + + + + + + + + +mod_sharedmem +Slot-based shared memory provider. +Extension +mod_sharedmem.c +sharedmem_module + + +

mod_sharedmem is a memory provider which + provides for creation and access to a shared memory segment + in which the datasets are organized in "slots." Although + it can be used directly, normally mod_slotmem + is used as a front-end. +

+ +

mod_sharedmem provides the following + API functions: +

+ +
+
apr_status_t slotmem_do(ap_slotmem_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)
+
call the callback on all worker slots
+ +
apr_status_t slotmem_create(ap_slotmem_t **new, const char *name, apr_size_t item_size, int item_num, apr_pool_t *pool)
+
create a new slotmem with each item size is item_size.
+ +
apr_status_t slotmem_attach(ap_slotmem_t **new, const char *name, apr_size_t *item_size, int *item_num, apr_pool_t *pool)
+
attach to an existing slotmem.
+ +
apr_status_t slotmem_mem(ap_slotmem_t *s, int item_id, void**mem)
+
get the memory associated with this worker slot.
+ +
apr_status_t slotmem_lock(ap_slotmem_t *s)
+
lock the memory segment
+ +
(apr_status_t slotmem_unlock(ap_slotmem_t *s)
+
unlock the memory segment
+
+ +
+ +
diff --git a/docs/manual/mod/mod_slotmem.xml b/docs/manual/mod/mod_slotmem.xml new file mode 100644 index 0000000000..2bf673cb12 --- /dev/null +++ b/docs/manual/mod/mod_slotmem.xml @@ -0,0 +1,73 @@ + + + + + + + + + +mod_slotmem +Slot-based memory implementation API. +Extension +mod_slotmem.c +slotmem_module + + +

mod_slotmem provides an interface to a + memory allocation implementation which is based on the + concept of datasets being in various "slots" within + a larger memory segment. As such, it is similar in + concept to a generic table or array. The real use of + the module is as a front-end to various providers + (such as mod_sharedmem) which deal + with the actual implementations. This allows modules + to use a single API for memory usage, to matter what + the underlying implementation is. +

+ +

mod_slotmem provides the following + API functions: +

+ +
+
ap_slotmem_storage_method *ap_slotmem_method(const char *provider)
+
obtain the provider method desired
+ +
apr_status_t ap_slotmem_do(ap_slotmem_storage_method *sm, ap_slotmem_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)
+
call the callback on all worker slots
+ +
apr_status_t ap_slotmem_create(ap_slotmem_storage_method *sm, ap_slotmem_t **new, const char *name, apr_size_t item_size, int item_num, apr_pool_t *pool)
+
create a new slotmem with each item size is item_size.
+ +
apr_status_t ap_slotmem_attach(ap_slotmem_storage_method *sm, ap_slotmem_t **new, const char *name, apr_size_t *item_size, int *item_num, apr_pool_t *pool)
+
attach to an existing slotmem.
+ +
apr_status_t ap_slotmem_mem(ap_slotmem_storage_method *sm, ap_slotmem_t *s, int item_id, void**mem)
+
get the memory associated with this worker slot.
+ +
apr_status_t ap_slotmem_lock(ap_slotmem_storage_method *sm, ap_slotmem_t *s)
+
lock the memory segment
+ +
(apr_status_t ap_slotmem_unlock(ap_slotmem_storage_method *sm, ap_slotmem_t *s)
+
unlock the memory segment
+
+ +
+ +