Apache Module mod_slotmem_shm
Apache Module mod_slotmem_shm
Summary
Directives
is a memory provider which provides for creation and access to a shared memory segment in which the datasets are organized in "slots."
All shared memory is cleared and cleaned with each restart, whether graceful or not. The data itself is stored and restored within a file noted by the name
parameter in the create
calls. If not specified with an absolute path, the file will be created relative to the path specified by the DefaultRuntimeDir
provides the following API functions:
- aprstatust doall(apslotmeminstancet s, apslotmemcallbackfnt func, void data, aprpoolt pool) - call the callback on all worker slots - aprstatust create(apslotmeminstancet new, const char name, aprsizet itemsize, unsigned int itemnum, apslotmemtypet type, aprpoolt pool) - create a new slotmem with each item size is itemsize. name
is used to generate a filename for the persistent store of the shared memory if configured. Values are: "none"
- aprstatust attach(apslotmeminstancet new, const char name, aprsizet itemsize, unsigned int itemnum, aprpool_t pool) - attach to an existing slotmem. See create
parameter. - aprstatust dptr(apslotmeminstancet s, unsigned int itemid, voidmem) - get the direct pointer to the memory associated with this worker slot. - aprstatust get(apslotmeminstancet s, unsigned int itemid, unsigned char dest, aprsizet destlen) - get/read the memory from this slot to dest - aprstatust put(apslotmeminstancet slot, unsigned int itemid, unsigned char src, aprsizet srclen) - put/write the data from src to this slot - unsigned int numslots(apslotmeminstancet s) - return the total number of slots in the segment - aprsizet slotsize(apslotmeminstancet s) - return the total data size, in bytes, of a slot in the segment - aprstatust grab(apslotmeminstancet s, unsigned int itemid); - grab or allocate the first free slot and mark as in-use (does not do any data copying) - aprstatust fgrab(apslotmeminstancet s, unsigned int itemid); - forced grab or allocate the specified slot and mark as in-use (does not do any data copying) - aprstatust release(apslotmeminstancet *s, unsigned int itemid); - release or free a slot and mark as not in-use (does not do any data copying)
Modules | Directives | FAQ | Glossary | Sitemap
Apache HTTP Server Version 2.4
Modules
Modules | Directives | FAQ | Glossary | Sitemap
Apache Module mod_slotmem_shm
Available Languages: en | fr
en
Available Languages: en | fr
Apache License, Version 2.0
Copyright 2014 The Apache Software Foundation.Licensed under the Apache License, Version 2.0.