File: a00217.html

package info (click to toggle)
libloki 0.1.7-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,608 kB
  • sloc: cpp: 30,475; ansic: 1,974; makefile: 365; php: 316; perl: 108
file content (154 lines) | stat: -rwxr-xr-x 7,786 bytes parent folder | download | duplicates (5)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Loki: Internals</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="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Internals<br>
<small>
[<a class="el" href="a00216.html">Small objects</a>]</small>
</h1>
<p>
<div class="dynheader">
Collaboration diagram for Internals:</div>
<div class="dynsection">
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html">Loki::SmallObjAllocator</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00002.html">Loki::AllocatorSingleton&lt; ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy &gt;</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00025.html">Loki::Chunk</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00056.html">Loki::FixedAllocator</a></td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00217.html#g2f0821e243f812a3ae2abfaea51895e8">Loki::GetOffset</a> (std::size_t numBytes, std::size_t alignment)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00217.html#g2444c5bff0a61b6751fb5f57e0c7e8c7">Loki::DefaultAllocator</a> (std::size_t numBytes, bool doThrow)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00217.html#g1d24bf776342ace8f2004e3a173f6cb3">Loki::DefaultDeallocator</a> (void *p)</td></tr>

</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g2444c5bff0a61b6751fb5f57e0c7e8c7"></a><!-- doxytag: member="Loki::DefaultAllocator" ref="g2444c5bff0a61b6751fb5f57e0c7e8c7" args="(std::size_t numBytes, bool doThrow)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* Loki::DefaultAllocator           </td>
          <td>(</td>
          <td class="paramtype">std::size_t&nbsp;</td>
          <td class="paramname"> <em>numBytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>doThrow</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Calls the default allocator when <a class="el" href="a00127.html">SmallObjAllocator</a> decides not to handle a request. <a class="el" href="a00127.html">SmallObjAllocator</a> calls this if the number of bytes is bigger than the size which can be handled by any <a class="el" href="a00056.html">FixedAllocator</a>. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>numBytes</em>&nbsp;</td><td>number of bytes </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>doThrow</em>&nbsp;</td><td>True if this function should throw an exception, or false if it should indicate failure by returning a NULL pointer. </td></tr>
  </table>
</dl>

<p>Referenced by <a class="el" href="a00261.html#l01109">Loki::SmallObjAllocator::Allocate()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g1d24bf776342ace8f2004e3a173f6cb3"></a><!-- doxytag: member="Loki::DefaultDeallocator" ref="g1d24bf776342ace8f2004e3a173f6cb3" args="(void *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Loki::DefaultDeallocator           </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>p</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Calls default deallocator when <a class="el" href="a00127.html">SmallObjAllocator</a> decides not to handle a request. The default deallocator could be the global delete operator or the free function. The free function is the preferred default deallocator since it matches malloc which is the preferred default allocator. <a class="el" href="a00127.html">SmallObjAllocator</a> will call this if an address was not found among any of its own blocks. 
<p>Referenced by <a class="el" href="a00261.html#l01144">Loki::SmallObjAllocator::Deallocate()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g2f0821e243f812a3ae2abfaea51895e8"></a><!-- doxytag: member="Loki::GetOffset" ref="g2f0821e243f812a3ae2abfaea51895e8" args="(std::size_t numBytes, std::size_t alignment)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t Loki::GetOffset           </td>
          <td>(</td>
          <td class="paramtype">std::size_t&nbsp;</td>
          <td class="paramname"> <em>numBytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&nbsp;</td>
          <td class="paramname"> <em>alignment</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Calculates index into array where a <a class="el" href="a00056.html">FixedAllocator</a> of numBytes is located. 
<p>Referenced by <a class="el" href="a00261.html#l01109">Loki::SmallObjAllocator::Allocate()</a>, <a class="el" href="a00261.html#l01144">Loki::SmallObjAllocator::Deallocate()</a>, <a class="el" href="a00261.html#l01199">Loki::SmallObjAllocator::IsCorrupt()</a>, <a class="el" href="a00261.html#l01060">Loki::SmallObjAllocator::SmallObjAllocator()</a>, and <a class="el" href="a00261.html#l01088">Loki::SmallObjAllocator::TrimExcessMemory()</a>.</p>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 29 18:51:40 2009 for Loki 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>