mod_slotmem_plain.html.en revision af33a4994ae2ff15bc67d19ff1a7feb906745bf8
10eed2803538d660048f6e733602e82a75ef6885noodl<?xml version="1.0" encoding="ISO-8859-1"?>
10eed2803538d660048f6e733602e82a75ef6885noodl<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
10eed2803538d660048f6e733602e82a75ef6885noodl<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
10eed2803538d660048f6e733602e82a75ef6885noodl XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
10eed2803538d660048f6e733602e82a75ef6885noodl This file is generated from xml source: DO NOT EDIT
10eed2803538d660048f6e733602e82a75ef6885noodl XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
10eed2803538d660048f6e733602e82a75ef6885noodl -->
10eed2803538d660048f6e733602e82a75ef6885noodl<title>mod_slotmem_plain - Apache HTTP Server</title>
10eed2803538d660048f6e733602e82a75ef6885noodl<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10eed2803538d660048f6e733602e82a75ef6885noodl<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<script src="/style/scripts/prettify.js" type="text/javascript">
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen</script>
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen
10eed2803538d660048f6e733602e82a75ef6885noodl<link href="/images/favicon.ico" rel="shortcut icon" /></head>
10eed2803538d660048f6e733602e82a75ef6885noodl<body>
10eed2803538d660048f6e733602e82a75ef6885noodl<div id="page-header">
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<p class="apache">Apache HTTP Server Version 2.5</p>
10eed2803538d660048f6e733602e82a75ef6885noodl<img alt="" src="/images/feather.gif" /></div>
10eed2803538d660048f6e733602e82a75ef6885noodl<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
10eed2803538d660048f6e733602e82a75ef6885noodl<div id="path">
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<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.5</a> &gt; <a href="./">Modules</a></div>
10eed2803538d660048f6e733602e82a75ef6885noodl<div id="page-content">
10eed2803538d660048f6e733602e82a75ef6885noodl<div id="preamble"><h1>Apache Module mod_slotmem_plain</h1>
10eed2803538d660048f6e733602e82a75ef6885noodl<div class="toplang">
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<p><span>Available Languages: </span><a href="/en/mod/mod_slotmem_plain.html" title="English">&nbsp;en&nbsp;</a></p>
10eed2803538d660048f6e733602e82a75ef6885noodl</div>
10eed2803538d660048f6e733602e82a75ef6885noodl<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Slot-based shared memory provider.</td></tr>
7f0952c0239ea2d6e37b472db6fde4ef2718343dsf<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
10eed2803538d660048f6e733602e82a75ef6885noodl<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>slotmem_plain_module</td></tr>
46f74e65e6051e6e9391c8e17c5116317210facetakashi<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_slotmem_plain.c</td></tr></table>
2f46ce2a814d7f2b126dfb9f1b25fd64e2fbdc11rbowen<h3>Summary</h3>
10eed2803538d660048f6e733602e82a75ef6885noodl
10eed2803538d660048f6e733602e82a75ef6885noodl <p><code>mod_slotmem_plain</code> is a memory provider which
10eed2803538d660048f6e733602e82a75ef6885noodl provides for creation and access to a plain memory segment
10eed2803538d660048f6e733602e82a75ef6885noodl in which the datasets are organized in "slots."
10eed2803538d660048f6e733602e82a75ef6885noodl </p>
10eed2803538d660048f6e733602e82a75ef6885noodl
10eed2803538d660048f6e733602e82a75ef6885noodl <p>If the memory needs to be shared between threads and
10eed2803538d660048f6e733602e82a75ef6885noodl processes, a better provider would be
10eed2803538d660048f6e733602e82a75ef6885noodl <code class="module"><a href="/mod/mod_slotmem_shm.html">mod_slotmem_shm</a></code>.
10eed2803538d660048f6e733602e82a75ef6885noodl </p>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh
10eed2803538d660048f6e733602e82a75ef6885noodl <p><code>mod_slotmem_plain</code> provides the following API functions:
10eed2803538d660048f6e733602e82a75ef6885noodl </p>
10eed2803538d660048f6e733602e82a75ef6885noodl
10eed2803538d660048f6e733602e82a75ef6885noodl <dl>
10eed2803538d660048f6e733602e82a75ef6885noodl <dt>apr_status_t doall(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)</dt>
2060bb0b7e53ae377492426fe35fe4d3cf5bf815jim <dd>call the callback on all worker slots</dd>
10eed2803538d660048f6e733602e82a75ef6885noodl
10eed2803538d660048f6e733602e82a75ef6885noodl <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>
7f0952c0239ea2d6e37b472db6fde4ef2718343dsf <dd>create a new slotmem with each item size is item_size.</dd>
10eed2803538d660048f6e733602e82a75ef6885noodl
10eed2803538d660048f6e733602e82a75ef6885noodl <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>
10eed2803538d660048f6e733602e82a75ef6885noodl <dd>attach to an existing slotmem.</dd>
10eed2803538d660048f6e733602e82a75ef6885noodl
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <dt>apr_status_t dptr(ap_slotmem_instance_t *s, unsigned int item_id, void**mem)</dt>
10eed2803538d660048f6e733602e82a75ef6885noodl <dd>get the direct pointer to the memory associated with this worker slot.</dd>
10eed2803538d660048f6e733602e82a75ef6885noodl
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <dt>apr_status_t get(ap_slotmem_instance_t *s, unsigned int item_id, unsigned char *dest, apr_size_t dest_len)</dt>
10eed2803538d660048f6e733602e82a75ef6885noodl <dd>get/read the memory from this slot to dest</dd>
10eed2803538d660048f6e733602e82a75ef6885noodl
10eed2803538d660048f6e733602e82a75ef6885noodl <dt>apr_status_t put(ap_slotmem_instance_t *slot, unsigned int item_id, unsigned char *src, apr_size_t src_len)</dt>
10eed2803538d660048f6e733602e82a75ef6885noodl <dd>put/write the data from src to this slot</dd>
10eed2803538d660048f6e733602e82a75ef6885noodl
10eed2803538d660048f6e733602e82a75ef6885noodl <dt>unsigned int num_slots(ap_slotmem_instance_t *s)</dt>
10eed2803538d660048f6e733602e82a75ef6885noodl <dd>return the total number of slots in the segment</dd>
10eed2803538d660048f6e733602e82a75ef6885noodl
10eed2803538d660048f6e733602e82a75ef6885noodl <dt>apr_size_t slot_size(ap_slotmem_instance_t *s)</dt>
10eed2803538d660048f6e733602e82a75ef6885noodl <dd>return the total data size, in bytes, of a slot in the segment</dd>
2060bb0b7e53ae377492426fe35fe4d3cf5bf815jim
2060bb0b7e53ae377492426fe35fe4d3cf5bf815jim <dt>apr_status_t grab(ap_slotmem_instance_t *s, unsigned int *item_id);</dt>
2060bb0b7e53ae377492426fe35fe4d3cf5bf815jim <dd>grab or allocate the first free slot and mark as in-use (does not do any data copying)</dd>
2060bb0b7e53ae377492426fe35fe4d3cf5bf815jim
2060bb0b7e53ae377492426fe35fe4d3cf5bf815jim <dt>apr_status_t fgrab(ap_slotmem_instance_t *s, unsigned int item_id);</dt>
2060bb0b7e53ae377492426fe35fe4d3cf5bf815jim <dd>forced grab or allocate the specified slot and mark as in-use (does not do any data copying)</dd>
2060bb0b7e53ae377492426fe35fe4d3cf5bf815jim
2060bb0b7e53ae377492426fe35fe4d3cf5bf815jim <dt>apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);</dt>
10eed2803538d660048f6e733602e82a75ef6885noodl <dd>release or free a slot and mark as not in-use (does not do any data copying)</dd>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf </dl>
e487d6c09669296f94a5190cc34586a98e624a00nd
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh</div>
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh<div id="quickview"><h3 class="directives">Directives</h3>
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh<p>This module provides no
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh directives.</p>
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh<ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
e487d6c09669296f94a5190cc34586a98e624a00nd
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf</div>
10eed2803538d660048f6e733602e82a75ef6885noodl<div class="bottomlang">
10eed2803538d660048f6e733602e82a75ef6885noodl<p><span>Available Languages: </span><a href="/en/mod/mod_slotmem_plain.html" title="English">&nbsp;en&nbsp;</a></p>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
e487d6c09669296f94a5190cc34586a98e624a00nd<script type="text/javascript"><!--//--><![CDATA[//><!--
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedoohvar comments_shortname = 'httpd';
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedoohvar comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_slotmem_plain.html';
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh(function(w, d) {
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh d.write('<div id="comments_thread"><\/div>');
e487d6c09669296f94a5190cc34586a98e624a00nd var s = d.createElement('script');
10eed2803538d660048f6e733602e82a75ef6885noodl s.type = 'text/javascript';
4cb65c31bc681540ea623e1cb2bdd09749fb8d7esf s.async = true;
206f0fb731ca7d2d2b2378cbd5b2882080490bd7covener s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
e487d6c09669296f94a5190cc34586a98e624a00nd (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh }
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh else {
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh }
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh})(window, document);
a4784b5a082381b03e972caf3aa052a64c68f06dhumbedooh//--><!]]></script></div><div id="footer">
e487d6c09669296f94a5190cc34586a98e624a00nd<p class="apache">Copyright 2013 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>
206f0fb731ca7d2d2b2378cbd5b2882080490bd7covener<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
f97b24463c41ab08129805bc63069b59c3ee0b48rbowenif (typeof(prettyPrint) !== 'undefined') {
f97b24463c41ab08129805bc63069b59c3ee0b48rbowen prettyPrint();
f97b24463c41ab08129805bc63069b59c3ee0b48rbowen}
f97b24463c41ab08129805bc63069b59c3ee0b48rbowen//--><!]]></script>
f97b24463c41ab08129805bc63069b59c3ee0b48rbowen</body></html>