<-
Apache > HTTP Server > Documentation > Version 2.3 > Modules

Apache Module mod_slotmem

Available Languages:  en 

Description:Slot-based memory implementation API.
Status:Extension
Module Identifier:slotmem_module
Source File:mod_slotmem.c

Summary

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

Directives

This module provides no directives.

Available Languages:  en