summaryrefslogtreecommitdiff
path: root/slabs_8h-source.html
blob: 0d1b9e8b8cfaf35ed7ac23042117b78c947dc923 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>memcached: slabs.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>slabs.h</h1><a href="slabs_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* slabs memory allocation */</span>
<a name="l00002"></a>00002 <span class="preprocessor">#ifndef SLABS_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#define SLABS_H</span>
<a name="l00004"></a>00004 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="keywordtype">void</span> <a class="code" href="slabs_8c.html#8cc4ad6521988a6806c2600bd2f2010b" title="Determines the chunk sizes and initializes the slab class descriptors accordingly...">slabs_init</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> limit, <span class="keyword">const</span> <span class="keywordtype">double</span> factor, <span class="keyword">const</span> <span class="keywordtype">bool</span> prealloc);
<a name="l00012"></a>00012 
<a name="l00013"></a>00013 
<a name="l00019"></a>00019 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="slabs_8c.html#89e035684df4bb1ef8b0852cb2c20f00" title="Given object size, return id to use when allocating/freeing memory for object 0 means...">slabs_clsid</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> size);
<a name="l00020"></a>00020  <span class="comment">/*@null@*/</span>
<a name="l00022"></a>00022 <span class="keywordtype">void</span> *<a class="code" href="slabs_8c.html#f71fcc67d3024b6d57945de6215fa421" title="Allocate object of given length.">slabs_alloc</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> size, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>);
<a name="l00023"></a>00023 
<a name="l00025"></a>00025 <span class="keywordtype">void</span> <a class="code" href="slabs_8c.html#870e49205e3adc320d078b03d8ea3b23" title="Free previously allocated object.">slabs_free</a>(<span class="keywordtype">void</span> *ptr, <span class="keywordtype">size_t</span> size, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>);
<a name="l00026"></a>00026 
<a name="l00028"></a>00028 <span class="keywordtype">bool</span> <a class="code" href="slabs_8c.html#0e8837809ec40b8024ca6f972830176c" title="Return a datum for stats in binary protocol.">get_stats</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *stat_type, <span class="keywordtype">int</span> nkey, <a class="code" href="memcached_8h.html#b8d9bd9ba0b7b765633bf9b6cbd6aa30" title="Callback for any function producing stats.">ADD_STAT</a> add_stats, <span class="keywordtype">void</span> *c);
<a name="l00029"></a>00029  <span class="comment">/*@null@*/</span>
<a name="l00031"></a>00031 <span class="keywordtype">void</span> <a class="code" href="slabs_8c.html#0d52f605d063c6de9e3f32e08126915c" title="Fill buffer with stats.">slabs_stats</a>(<a class="code" href="memcached_8h.html#b8d9bd9ba0b7b765633bf9b6cbd6aa30" title="Callback for any function producing stats.">ADD_STAT</a> add_stats, <span class="keywordtype">void</span> *c);
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="comment">/* Request some slab be moved between classes</span>
<a name="l00034"></a>00034 <span class="comment">  1 = success</span>
<a name="l00035"></a>00035 <span class="comment">   0 = fail</span>
<a name="l00036"></a>00036 <span class="comment">   -1 = tried. busy. send again shortly. */</span>
<a name="l00037"></a>00037 <span class="keywordtype">int</span> <a class="code" href="slabs_8h.html#49b5362752d1ccb850dc1af43c479a7a">slabs_reassign</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> srcid, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> dstid);
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 17 16:28:06 2009 for memcached by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>