mod_slotmem_shm.html.en revision f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654
383N/A<?xml version="1.0" encoding="ISO-8859-1"?>
383N/A<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
383N/A<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
383N/A XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
383N/A This file is generated from xml source: DO NOT EDIT
383N/A XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
383N/A -->
383N/A<title>mod_slotmem_shm - Apache HTTP Server</title>
6982N/A<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
6982N/A<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
383N/A<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
383N/A<link href="/images/favicon.ico" rel="shortcut icon" /></head>
383N/A<body>
383N/A<div id="page-header">
6982N/A<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
6982N/A<p class="apache">Apache HTTP Server Version 2.3</p>
6982N/A<img alt="" src="/images/feather.gif" /></div>
6982N/A<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
383N/A<div id="path">
383N/A<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
383N/A<div id="page-content">
383N/A<div id="preamble"><h1>Apache Module mod_slotmem_shm</h1>
383N/A<div class="toplang">
3215N/A<p><span>Available Languages: </span><a href="/en/mod/mod_slotmem_shm.html" title="English">&nbsp;en&nbsp;</a></p>
6061N/A</div>
383N/A<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Slot-based shared memory provider.</td></tr>
383N/A<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
383N/A<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>mod_slotmem_shm_module</td></tr>
383N/A<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_slotmem_shm.c</td></tr></table>
383N/A<h3>Summary</h3>
383N/A
383N/A <p><code>mod_slotmem_shm</code> is a memory provider which
383N/A provides for creation and access to a shared memory segment
6069N/A in which the datasets are organized in "slots."
383N/A </p>
6069N/A
6069N/A <p>All shared memory is cleared and cleaned with each
6069N/A restart, whether graceful or not. The data itself is
6069N/A stored and restored within a file noted by the <code>name</code>
6069N/A parameter in the <code>create</code> and <code>attach</code>
6069N/A calls.
6069N/A </p>
6069N/A
6069N/A <p><code>mod_slotmem_shm</code> provides the following API functions:
6069N/A </p>
3888N/A
383N/A <dl>
383N/A <dt>apr_status_t doall(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)</dt>
383N/A <dd>call the callback on all worker slots</dd>
383N/A
6069N/A <dt>apr_status_t create(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool)</dt>
383N/A <dd>create a new slotmem with each item size is item_size. <code>name</code> is the filename for the persistent store of
383N/A the shared memory. Values are:
383N/A <dl>
383N/A <dt><code>"none"</code></dt>
383N/A <dd><code>Does not persist shared memory in file.</code></dd>
383N/A <dt><code>"anonymous"</code></dt>
383N/A <dd><code>$server_root/logs/anonymous.slotmem</code></dd>
383N/A <dt><code>":file-name"</code></dt>
383N/A <dd><code>$server_root/logs/file-name.slotmem</code></dd>
383N/A <dt><code>"absolute-file-name"</code></dt>
383N/A <dd><code>$absolute-file-name.slotmem</code></dd>
383N/A </dl></dd>
383N/A
383N/A <dt>apr_status_t attach(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool)</dt>
383N/A <dd>attach to an existing slotmem. See <code>create</code> for description of <code>name</code> parameter.</dd>
383N/A
383N/A <dt>apr_status_t dptr(ap_slotmem_instance_t *s, unsigned int item_id, void**mem)</dt>
383N/A <dd>get the direct pointer to the memory associated with this worker slot.</dd>
383N/A
383N/A <dt>apr_status_t get(ap_slotmem_instance_t *s, unsigned int item_id, unsigned char *dest, apr_size_t dest_len)</dt>
383N/A <dd>get/read the memory from this slot to dest</dd>
6069N/A
383N/A <dt>apr_status_t put(ap_slotmem_instance_t *slot, unsigned int item_id, unsigned char *src, apr_size_t src_len)</dt>
383N/A <dd>put/write the data from src to this slot</dd>
383N/A
383N/A <dt>unsigned int num_slots(ap_slotmem_instance_t *s)</dt>
383N/A <dd>return the total number of slots in the segment</dd>
6069N/A
3888N/A <dt>apr_size_t slot_size(ap_slotmem_instance_t *s)</dt>
3888N/A <dd>return the total data size, in bytes, of a slot in the segment</dd>
3888N/A
3888N/A <dt>apr_status_t grab(ap_slotmem_instance_t *s, unsigned int item_id);</dt>
6069N/A <dd>grab or allocate a slot and mark as in-use (does not do any data copying)</dd>
383N/A
383N/A <dt>apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);</dt>
383N/A <dd>release or free a slot and mark as not in-use (does not do any data copying)</dd>
383N/A </dl>
383N/A
383N/A</div>
383N/A<div id="quickview"><h3 class="directives">Directives</h3>
383N/A<p>This module provides no
383N/A directives.</p>
383N/A</div>
383N/A
383N/A</div>
383N/A<div class="bottomlang">
383N/A<p><span>Available Languages: </span><a href="/en/mod/mod_slotmem_shm.html" title="English">&nbsp;en&nbsp;</a></p>
3888N/A</div><div id="footer">
3888N/A<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
3888N/A<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>
3888N/A</body></html>