Apache HTTP Server Version 2.3

Apache > HTTP Server > Documentation > Version 2.3 > Modules

# Apache Module mod_sharedmem

Available Languages: en

Description: | Slot-based shared memory provider.
Status: | Extension
Module Identifier: | sharedmem_module
Source File: | mod_sharedmem.c

### Summary

`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

### Directives

This module provides no directives.

Available Languages: en