|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
|
|
Packit |
90a5c9 |
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
|
Packit |
90a5c9 |
This file is generated from xml source: DO NOT EDIT
|
|
Packit |
90a5c9 |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
|
Packit |
90a5c9 |
-->
|
|
Packit |
90a5c9 |
<title>mod_slotmem_shm - Apache HTTP Server Version 2.4</title>
|
|
Packit |
90a5c9 |
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
|
|
Packit |
90a5c9 |
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
|
|
Packit |
90a5c9 |
<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" />
|
|
Packit |
90a5c9 |
<script src="../style/scripts/prettify.min.js" type="text/javascript">
|
|
Packit |
90a5c9 |
</script>
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
<link href="../images/favicon.ico" rel="shortcut icon" /></head>
|
|
Packit |
90a5c9 |
<body>
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
Modules | Directives | FAQ | Glossary | Sitemap
|
|
Packit |
90a5c9 |
Apache HTTP Server Version 2.4
|
|
Packit |
90a5c9 |
![](../images/feather.png)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
Apache > HTTP Server > Documentation > Version 2.4 > Modules
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
Apache Module mod_slotmem_shm
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
Available Languages: en |
|
|
Packit |
90a5c9 |
fr
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
Status:Extension
|
|
Packit |
90a5c9 |
Module Identifier:slotmem_shm_module
|
|
Packit |
90a5c9 |
Source File:mod_slotmem_shm.c
|
|
Packit |
90a5c9 |
Summary
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
mod_slotmem_shm is a memory provider which
|
|
Packit |
90a5c9 |
provides for creation and access to a shared memory segment
|
|
Packit |
90a5c9 |
in which the datasets are organized in "slots."
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
All shared memory is cleared and cleaned with each
|
|
Packit |
90a5c9 |
restart, whether graceful or not. The data itself is
|
|
Packit |
90a5c9 |
stored and restored within a file noted by the name
|
|
Packit |
90a5c9 |
parameter in the create and attach
|
|
Packit |
90a5c9 |
calls. If not specified with an absolute path, the file will be
|
|
Packit |
90a5c9 |
created relative to the path specified by the
|
|
Packit |
90a5c9 |
DefaultRuntimeDir directive.
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
mod_slotmem_shm provides the following API functions:
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* call the callback on all worker slots */
|
|
Packit |
90a5c9 |
apr_status_t doall(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* create a new slotmem with each item size is item_size. 'name' is used to generate a filename for the persistent
|
|
Packit |
90a5c9 |
store of the shared memory if configured. Values are:
|
|
Packit |
90a5c9 |
"none" - Anonymous shared memory and no persistent store
|
|
Packit |
90a5c9 |
"file-name" - [DefaultRuntimeDir]/file-name
|
|
Packit |
90a5c9 |
"/absolute-file-name" - Absolute file name */
|
|
Packit |
90a5c9 |
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)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* attach to an existing slotmem. See 'create()' for description of 'name' parameter */
|
|
Packit |
90a5c9 |
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)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* get the direct pointer to the memory associated with this worker slot */
|
|
Packit |
90a5c9 |
apr_status_t dptr(ap_slotmem_instance_t *s, unsigned int item_id, void **mem)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* get/read the memory from this slot to dest */
|
|
Packit |
90a5c9 |
apr_status_t get(ap_slotmem_instance_t *s, unsigned int item_id, unsigned char *dest, apr_size_t dest_len)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* put/write the data from src to this slot */
|
|
Packit |
90a5c9 |
apr_status_t put(ap_slotmem_instance_t *slot, unsigned int item_id, unsigned char *src, apr_size_t src_len)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* return the total number of slots in the segment */
|
|
Packit |
90a5c9 |
unsigned int num_slots(ap_slotmem_instance_t *s)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* return the total data size, in bytes, of a slot in the segment */
|
|
Packit |
90a5c9 |
apr_size_t slot_size(ap_slotmem_instance_t *s)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* grab or allocate the first free slot and mark as in-use (does not do any data copying) */
|
|
Packit |
90a5c9 |
apr_status_t grab(ap_slotmem_instance_t *s, unsigned int *item_id)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* forced grab or allocate the specified slot and mark as in-use (does not do any data copying) */
|
|
Packit |
90a5c9 |
apr_status_t fgrab(ap_slotmem_instance_t *s, unsigned int item_id)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* release or free a slot and mark as not in-use (does not do any data copying) */
|
|
Packit |
90a5c9 |
apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
![Support Apache!]() Directives
|
|
Packit |
90a5c9 |
This module provides no
|
|
Packit |
90a5c9 |
directives.
|
|
Packit |
90a5c9 |
Bugfix checklistSee also
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
Comments
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
Available Languages: en |
|
|
Packit |
90a5c9 |
fr
|
|
Packit |
90a5c9 |
Notice:This is not a Q&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 mailing lists.
|
|
Packit |
90a5c9 |
<script type="text/javascript">
|
|
Packit |
90a5c9 |
var comments_shortname = 'httpd';
|
|
Packit |
90a5c9 |
var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_slotmem_shm.html';
|
|
Packit |
90a5c9 |
(function(w, d) {
|
|
Packit |
90a5c9 |
if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
|
|
Packit |
90a5c9 |
d.write('
|
|
Packit |
90a5c9 |
var s = d.createElement('script');
|
|
Packit |
90a5c9 |
s.type = 'text/javascript';
|
|
Packit |
90a5c9 |
s.async = true;
|
|
Packit |
90a5c9 |
s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
|
|
Packit |
90a5c9 |
(d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
|
|
Packit |
90a5c9 |
}
|
|
Packit |
90a5c9 |
else {
|
|
Packit |
90a5c9 |
d.write('
|
|
Packit |
90a5c9 |
}
|
|
Packit |
90a5c9 |
})(window, document);
|
|
Packit |
90a5c9 |
//--></script>
|
|
Packit |
90a5c9 |
Copyright 2018 The Apache Software Foundation. Licensed under the Apache License, Version 2.0.
|
|
Packit |
90a5c9 |
Modules | Directives | FAQ | Glossary | Sitemap <script type="text/javascript">
|
|
Packit |
90a5c9 |
if (typeof(prettyPrint) !== 'undefined') {
|
|
Packit |
90a5c9 |
prettyPrint();
|
|
Packit |
90a5c9 |
}
|
|
Packit |
90a5c9 |
//--></script>
|
|
Packit |
90a5c9 |
</body></html>
|