summaryrefslogtreecommitdiff
path: root/structcache__t.html
blob: b76f65c10a31a3691aaecc6597fe159f1bf10c30 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!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: cache_t Struct Reference</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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>cache_t Struct Reference</h1><!-- doxytag: class="cache_t" -->Definition of the structure to keep track of the internal details of the cache allocator.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="cache_8h-source.html">cache.h</a>&gt;</code>
<p>

<p>
<a href="structcache__t-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">pthread_mutex_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcache__t.html#bd82ae1c6f8afecb2d59c606b6b363a6">mutex</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Mutex to protect access to the structure.  <a href="#bd82ae1c6f8afecb2d59c606b6b363a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcache__t.html#a2126af24d1226c9ba341cbbecde245b">name</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Name of the cache objects in this cache (provided by the caller).  <a href="#a2126af24d1226c9ba341cbbecde245b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void **&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcache__t.html#0434599c19031c52b6a4fe98b443a073">ptr</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">List of pointers to available buffers in this cache.  <a href="#0434599c19031c52b6a4fe98b443a073"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcache__t.html#85f861c4628b5cf099f95594cd64df27">bufsize</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The size of each element in this cache.  <a href="#85f861c4628b5cf099f95594cd64df27"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcache__t.html#24f29d93303d192bcbfc87dda3ef296b">freetotal</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The capacity of the list of elements.  <a href="#24f29d93303d192bcbfc87dda3ef296b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcache__t.html#e01151c875560f6f7fb91208bbbcdbb6">freecurr</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The current number of free elements.  <a href="#e01151c875560f6f7fb91208bbbcdbb6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cache_8h.html#565b39d1034d5aaccafd0e996904eebc">cache_constructor_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcache__t.html#673b6ff5141c7dcbc97c2f8756a5b7bc">constructor</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The constructor to be called each time we allocate more memory.  <a href="#673b6ff5141c7dcbc97c2f8756a5b7bc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cache_8h.html#7ac51941cc19301c6ce8b7c4a3d5dd9c">cache_destructor_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcache__t.html#41c291d17863ce98057bbcb01fd27719">destructor</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The destructor to be called each time before we release memory.  <a href="#41c291d17863ce98057bbcb01fd27719"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Definition of the structure to keep track of the internal details of the cache allocator. 
<p>
Touching any of these variables results in undefined behavior. <hr><h2>Member Data Documentation</h2>
<a class="anchor" name="85f861c4628b5cf099f95594cd64df27"></a><!-- doxytag: member="cache_t::bufsize" ref="85f861c4628b5cf099f95594cd64df27" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="structcache__t.html#85f861c4628b5cf099f95594cd64df27">cache_t::bufsize</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The size of each element in this cache. 
<p>

</div>
</div><p>
<a class="anchor" name="673b6ff5141c7dcbc97c2f8756a5b7bc"></a><!-- doxytag: member="cache_t::constructor" ref="673b6ff5141c7dcbc97c2f8756a5b7bc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="cache_8h.html#565b39d1034d5aaccafd0e996904eebc">cache_constructor_t</a>* <a class="el" href="structcache__t.html#673b6ff5141c7dcbc97c2f8756a5b7bc">cache_t::constructor</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The constructor to be called each time we allocate more memory. 
<p>

</div>
</div><p>
<a class="anchor" name="41c291d17863ce98057bbcb01fd27719"></a><!-- doxytag: member="cache_t::destructor" ref="41c291d17863ce98057bbcb01fd27719" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="cache_8h.html#7ac51941cc19301c6ce8b7c4a3d5dd9c">cache_destructor_t</a>* <a class="el" href="structcache__t.html#41c291d17863ce98057bbcb01fd27719">cache_t::destructor</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The destructor to be called each time before we release memory. 
<p>

</div>
</div><p>
<a class="anchor" name="e01151c875560f6f7fb91208bbbcdbb6"></a><!-- doxytag: member="cache_t::freecurr" ref="e01151c875560f6f7fb91208bbbcdbb6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="structcache__t.html#e01151c875560f6f7fb91208bbbcdbb6">cache_t::freecurr</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The current number of free elements. 
<p>

</div>
</div><p>
<a class="anchor" name="24f29d93303d192bcbfc87dda3ef296b"></a><!-- doxytag: member="cache_t::freetotal" ref="24f29d93303d192bcbfc87dda3ef296b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="structcache__t.html#24f29d93303d192bcbfc87dda3ef296b">cache_t::freetotal</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The capacity of the list of elements. 
<p>

</div>
</div><p>
<a class="anchor" name="bd82ae1c6f8afecb2d59c606b6b363a6"></a><!-- doxytag: member="cache_t::mutex" ref="bd82ae1c6f8afecb2d59c606b6b363a6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pthread_mutex_t <a class="el" href="structcache__t.html#bd82ae1c6f8afecb2d59c606b6b363a6">cache_t::mutex</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Mutex to protect access to the structure. 
<p>

</div>
</div><p>
<a class="anchor" name="a2126af24d1226c9ba341cbbecde245b"></a><!-- doxytag: member="cache_t::name" ref="a2126af24d1226c9ba341cbbecde245b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="structcache__t.html#a2126af24d1226c9ba341cbbecde245b">cache_t::name</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Name of the cache objects in this cache (provided by the caller). 
<p>

</div>
</div><p>
<a class="anchor" name="0434599c19031c52b6a4fe98b443a073"></a><!-- doxytag: member="cache_t::ptr" ref="0434599c19031c52b6a4fe98b443a073" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void** <a class="el" href="structcache__t.html#0434599c19031c52b6a4fe98b443a073">cache_t::ptr</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
List of pointers to available buffers in this cache. 
<p>

</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="cache_8h-source.html">cache.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 17 16:28:30 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>