• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>oscl_mem_mempool.h Source File</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5</head><body>
6<!-- Generated by Doxygen 1.2.18 -->
7<center>
8<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
9<hr><h1>oscl_mem_mempool.h</h1><a href="oscl__mem__mempool_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">// -*- c++ -*-</span>
1000002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
1100003
1200004 <span class="comment">//               O S C L _ M E M _ M E M P O O L</span>
1300005
1400006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
1500007
1600019 <span class="preprocessor">#ifndef OSCL_MEM_MEMPOOL_H_INCLUDED</span>
1700020 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_MEM_MEMPOOL_H_INCLUDED</span>
1800021 <span class="preprocessor"></span>
1900022 <span class="preprocessor">#ifndef OSCL_MEM_H_INCLUDED</span>
2000023 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__mem_8h.html">oscl_mem.h</a>"</span>
2100024 <span class="preprocessor">#endif</span>
2200025 <span class="preprocessor"></span>
2300026 <span class="preprocessor">#ifndef OSCL_DEFALLOC_H_INCLUDED</span>
2400027 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__defalloc_8h.html">oscl_defalloc.h</a>"</span>
2500028 <span class="preprocessor">#endif</span>
2600029 <span class="preprocessor"></span>
2700030 <span class="preprocessor">#ifndef OSCL_VECTOR_H_INCLUDED</span>
2800031 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__vector_8h.html">oscl_vector.h</a>"</span>
2900032 <span class="preprocessor">#endif</span>
3000033 <span class="preprocessor"></span>
3100034
32<a name="l00041"></a><a class="code" href="classOsclMemPoolFixedChunkAllocatorObserver.html">00041</a> <span class="keyword">class </span><a class="code" href="classOsclMemPoolFixedChunkAllocatorObserver.html">OsclMemPoolFixedChunkAllocatorObserver</a>
3300042 {
3400043     <span class="keyword">public</span>:
3500044         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocatorObserver.html#a0">freechunkavailable</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>* aContextData) = 0;
36<a name="l00045"></a><a class="code" href="classOsclMemPoolFixedChunkAllocatorObserver.html#a1">00045</a>         <span class="keyword">virtual</span> <a class="code" href="classOsclMemPoolFixedChunkAllocatorObserver.html#a1">~OsclMemPoolFixedChunkAllocatorObserver</a>() {}
3700046 };
3800047
3900048
40<a name="l00049"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html">00049</a> <span class="keyword">class </span><a class="code" href="classOsclMemPoolFixedChunkAllocator.html">OsclMemPoolFixedChunkAllocator</a> : <span class="keyword">public</span> <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>
4100050 {
4200051     <span class="keyword">public</span>:
4300060         OSCL_IMPORT_REF <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a0">OsclMemPoolFixedChunkAllocator</a>(<span class="keyword">const</span> uint32 numchunk = 1, <span class="keyword">const</span> uint32 chunksize = 0, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>* gen_alloc = <a class="code" href="group__osclbase.html#a81">NULL</a>);
4400061
4500069         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a1">enablenullpointerreturn</a>();
4600070
4700073         OSCL_IMPORT_REF <span class="keyword">virtual</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a2">~OsclMemPoolFixedChunkAllocator</a>();
4800074
4900083         OSCL_IMPORT_REF <span class="keyword">virtual</span> <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a3">allocate</a>(<span class="keyword">const</span> uint32 n);
5000084
5100091         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a4">deallocate</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>* p);
5200092
5300099         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a5">notifyfreechunkavailable</a>(<a class="code" href="classOsclMemPoolFixedChunkAllocatorObserver.html">OsclMemPoolFixedChunkAllocatorObserver</a>&amp; obs, <a class="code" href="group__osclbase.html#a25">OsclAny</a>* aContextData = <a class="code" href="group__osclbase.html#a81">NULL</a>);
5400100
5500106         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a6">CancelFreeChunkAvailableCallback</a>();
5600107
5700113         OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a7">addRef</a>();
5800114
5900121         OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a8">removeRef</a>();
6000122
6100123     <span class="keyword">protected</span>:
6200124         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#b0">createmempool</a>();
6300125         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#b1">destroymempool</a>();
6400126
65<a name="l00127"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n0">00127</a>         uint32 <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n0">iNumChunk</a>;
66<a name="l00128"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n1">00128</a>         uint32 <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n1">iChunkSize</a>;
67<a name="l00129"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n2">00129</a>         uint32 <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n2">iChunkSizeMemAligned</a>;
68<a name="l00130"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n3">00130</a>         <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>* <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n3">iMemPoolAllocator</a>;
69<a name="l00131"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n4">00131</a>         <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n4">iMemPool</a>;
7000132
71<a name="l00133"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n5">00133</a>         <a class="code" href="classOscl__Vector.html">Oscl_Vector&lt;OsclAny*, OsclMemAllocator&gt;</a> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n5">iFreeMemChunkList</a>;
7200134
73<a name="l00135"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n6">00135</a>         <span class="keywordtype">bool</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n6">iCheckNextAvailableFreeChunk</a>;
74<a name="l00136"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n7">00136</a>         <a class="code" href="classOsclMemPoolFixedChunkAllocatorObserver.html">OsclMemPoolFixedChunkAllocatorObserver</a>* <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n7">iObserver</a>;
75<a name="l00137"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n8">00137</a>         <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n8">iNextAvailableContextData</a>;
7600138
77<a name="l00139"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n9">00139</a>         int32 <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n9">iRefCount</a>;
78<a name="l00140"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n10">00140</a>         <span class="keywordtype">bool</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n10">iEnableNullPtrReturn</a>;
7900141 };
8000142
8100143
82<a name="l00153"></a><a class="code" href="classOsclMemPoolResizableAllocatorObserver.html">00153</a> <span class="keyword">class </span><a class="code" href="classOsclMemPoolResizableAllocatorObserver.html">OsclMemPoolResizableAllocatorObserver</a>
8300154 {
8400155     <span class="keyword">public</span>:
8500156         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocatorObserver.html#a0">freeblockavailable</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>* aContextData) = 0;
86<a name="l00157"></a><a class="code" href="classOsclMemPoolResizableAllocatorObserver.html#a1">00157</a>         <span class="keyword">virtual</span> <a class="code" href="classOsclMemPoolResizableAllocatorObserver.html#a1">~OsclMemPoolResizableAllocatorObserver</a>() {}
8700158 };
8800159
89<a name="l00160"></a><a class="code" href="classOsclMemPoolResizableAllocatorMemoryObserver.html">00160</a> <span class="keyword">class </span><a class="code" href="classOsclMemPoolResizableAllocatorMemoryObserver.html">OsclMemPoolResizableAllocatorMemoryObserver</a>
9000161 {
9100162     <span class="keyword">public</span>:
9200163         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocatorMemoryObserver.html#a0">freememoryavailable</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>* aContextData) = 0;
93<a name="l00164"></a><a class="code" href="classOsclMemPoolResizableAllocatorMemoryObserver.html#a1">00164</a>         <span class="keyword">virtual</span> <a class="code" href="classOsclMemPoolResizableAllocatorMemoryObserver.html#a1">~OsclMemPoolResizableAllocatorMemoryObserver</a>() {}
9400165 };
9500166
96<a name="l00167"></a><a class="code" href="classOsclMemPoolResizableAllocator.html">00167</a> <span class="keyword">class </span><a class="code" href="classOsclMemPoolResizableAllocator.html">OsclMemPoolResizableAllocator</a> : <span class="keyword">public</span> <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>
9700168 {
9800169     <span class="keyword">public</span>:
9900182         OSCL_IMPORT_REF <a class="code" href="classOsclMemPoolResizableAllocator.html#a0">OsclMemPoolResizableAllocator</a>(uint32 aMemPoolBufferSize, uint32 aMemPoolBufferNumLimit = 0, uint32 aExpectedNumBlocksPerBuffer = 0, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>* gen_alloc = <a class="code" href="group__osclbase.html#a81">NULL</a>);
10000183
10100191         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a1">enablenullpointerreturn</a>();
10200192
10300200         OSCL_IMPORT_REF <span class="keyword">virtual</span> <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="classOsclMemPoolResizableAllocator.html#a2">allocate</a>(<span class="keyword">const</span> uint32 aNumBytes);
10400201
10500208         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a3">deallocate</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>* aPtr);
10600209
10700222         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a4">trim</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>* aPtr, uint32 aBytesToFree);
10800223
10900226         OSCL_IMPORT_REF uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#a5">getBufferSize</a>() <span class="keyword">const</span>;
11000227
11100231         OSCL_IMPORT_REF <span class="keyword">virtual</span> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#a6">getAllocatedSize</a>() <span class="keyword">const</span>;
11200232
11300235         OSCL_IMPORT_REF <span class="keyword">virtual</span> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#a7">getAvailableSize</a>() <span class="keyword">const</span>;
11400236
11500239         OSCL_IMPORT_REF <span class="keyword">virtual</span> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#a8">getLargestContiguousFreeBlockSize</a>() <span class="keyword">const</span>;
11600240
11700241         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a9">setMaxSzForNewMemPoolBuffer</a>(uint32 aMaxNewMemPoolBufferSz);
11800242
11900254         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a10">notifyfreeblockavailable</a>(<a class="code" href="classOsclMemPoolResizableAllocatorObserver.html">OsclMemPoolResizableAllocatorObserver</a>&amp; aObserver, uint32 aRequestedSize = 0, <a class="code" href="group__osclbase.html#a25">OsclAny</a>* aContextData = <a class="code" href="group__osclbase.html#a81">NULL</a>);
12000255
12100261         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a11">CancelFreeChunkAvailableCallback</a>();
12200262
12300263         OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a12">notifyfreememoryavailable</a>(<a class="code" href="classOsclMemPoolResizableAllocatorMemoryObserver.html">OsclMemPoolResizableAllocatorMemoryObserver</a>&amp; aObserver, uint32 aRequestedSize = 0, <a class="code" href="group__osclbase.html#a25">OsclAny</a>* aContextData = <a class="code" href="group__osclbase.html#a81">NULL</a>);
12400264         OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a13">CancelFreeMemoryAvailableCallback</a>();
12500265
12600271         OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a14">addRef</a>();
12700272
12800279         OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a15">removeRef</a>();
12900280
13000281
13100282         <span class="keyword">struct </span><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html">MemPoolBlockInfo</a>;
13200283
133<a name="l00284"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html">00284</a>         <span class="keyword">struct </span><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html">MemPoolBufferInfo</a>
13400285         {
135<a name="l00286"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m0">00286</a>             uint32 <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m0">iBufferPreFence</a>;             <span class="comment">// Pre-fence to check for memory corruption</span>
136<a name="l00287"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m1">00287</a>             <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m1">iStartAddr</a>;                <span class="comment">// Starting memory address of the memory pool buffer after the buffer info</span>
137<a name="l00288"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m2">00288</a>             <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m2">iEndAddr</a>;                  <span class="comment">// Ending memory address of the memory pool buffer</span>
138<a name="l00289"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m3">00289</a>             uint32 <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m3">iBufferSize</a>;                 <span class="comment">// Total size of the memory pool buffer including the buffer info header</span>
139<a name="l00290"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m4">00290</a>             uint32 <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m4">iNumOutstanding</a>;             <span class="comment">// Number of outstanding blocks from this memory pool buffer</span>
140<a name="l00291"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m5">00291</a>             <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html">MemPoolBlockInfo</a>* <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m5">iNextFreeBlock</a>; <span class="comment">// Pointer to the next free memory block</span>
141<a name="l00292"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m6">00292</a>             uint32 <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m6">iAllocatedSz</a>;                <span class="comment">//Number of butes allocated from the mempool</span>
142<a name="l00293"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m7">00293</a>             uint32 <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html#m7">iBufferPostFence</a>;    <span class="comment">// Post-fence to check for memory corruption</span>
14300294         };
14400295
145<a name="l00296"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html">00296</a>         <span class="keyword">struct </span><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html">MemPoolBlockInfo</a>
14600297         {
147<a name="l00298"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m0">00298</a>             uint32 <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m0">iBlockPreFence</a>;              <span class="comment">// Pre-fence to check for memory corruption</span>
148<a name="l00299"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m1">00299</a>             <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html">MemPoolBlockInfo</a>* <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m1">iNextFreeBlock</a>; <span class="comment">// Pointer to the next (right neighbor) free block in the buffer. NULL if none.</span>
149<a name="l00300"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m2">00300</a>             <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html">MemPoolBlockInfo</a>* <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m2">iPrevFreeBlock</a>; <span class="comment">// Pointer to the previous (left neighbor) free block in the buffer. NULL if first free block</span>
150<a name="l00301"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m3">00301</a>             uint32 <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m3">iBlockSize</a>;                  <span class="comment">// Total size of the block including the block info header</span>
151<a name="l00302"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m4">00302</a>             uint8* <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m4">iBlockBuffer</a>;                <span class="comment">// Pointer to the buffer area of the block</span>
152<a name="l00303"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m5">00303</a>             <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html">MemPoolBufferInfo</a>* <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m5">iParentBuffer</a>; <span class="comment">// Pointer to the block's parent memory pool buffer</span>
153<a name="l00304"></a><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m6">00304</a>             uint32 <a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html#m6">iBlockPostFence</a>;             <span class="comment">// Post-fence to check for memory corruption</span>
15400305         };
15500306
15600307     <span class="keyword">protected</span>:
15700308
15800311         OSCL_IMPORT_REF <span class="keyword">virtual</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#b0">~OsclMemPoolResizableAllocator</a>();
15900312
16000313         MemPoolBufferInfo* <a class="code" href="classOsclMemPoolResizableAllocator.html#b1">addnewmempoolbuffer</a>(uint32 aBufferSize);
16100314         <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#b2">destroyallmempoolbuffers</a>();
16200315         MemPoolBlockInfo* <a class="code" href="classOsclMemPoolResizableAllocator.html#b3">findfreeblock</a>(uint32 aBlockSize);
16300316         <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="classOsclMemPoolResizableAllocator.html#b4">allocateblock</a>(MemPoolBlockInfo&amp; aBlockPtr, uint32 aNumBytes);
16400317         <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#b5">deallocateblock</a>(MemPoolBlockInfo&amp; aBlockPtr);
16500318         <span class="keywordtype">bool</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#b6">validateblock</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>* aBlockBufPtr);
16600319
167<a name="l00320"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n0">00320</a>         uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n0">iMemPoolBufferSize</a>;
168<a name="l00321"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n1">00321</a>         uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n1">iMemPoolBufferNumLimit</a>;
169<a name="l00322"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n2">00322</a>         uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n2">iExpectedNumBlocksPerBuffer</a>;
170<a name="l00323"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n3">00323</a>         uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n3">iMaxNewMemPoolBufferSz</a>;
171<a name="l00324"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n4">00324</a>         <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>* <a class="code" href="classOsclMemPoolResizableAllocator.html#n4">iMemPoolBufferAllocator</a>;
172<a name="l00325"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n5">00325</a>         <a class="code" href="classOscl__Vector.html">Oscl_Vector&lt;MemPoolBufferInfo*, OsclMemAllocator&gt;</a> <a class="code" href="classOsclMemPoolResizableAllocator.html#n5">iMemPoolBufferList</a>;
17300326
174<a name="l00327"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n6">00327</a>         uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n6">iBufferInfoAlignedSize</a>;
175<a name="l00328"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n7">00328</a>         uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n7">iBlockInfoAlignedSize</a>;
17600329
177<a name="l00330"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n8">00330</a>         <span class="keywordtype">bool</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#n8">iCheckNextAvailable</a>;
178<a name="l00331"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n9">00331</a>         uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n9">iRequestedNextAvailableSize</a>;
179<a name="l00332"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n10">00332</a>         <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="classOsclMemPoolResizableAllocator.html#n10">iNextAvailableContextData</a>;
180<a name="l00333"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n11">00333</a>         <a class="code" href="classOsclMemPoolResizableAllocatorObserver.html">OsclMemPoolResizableAllocatorObserver</a>* <a class="code" href="classOsclMemPoolResizableAllocator.html#n11">iObserver</a>;
18100334
182<a name="l00335"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n12">00335</a>         <span class="keywordtype">bool</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#n12">iCheckFreeMemoryAvailable</a>;
183<a name="l00336"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n13">00336</a>         uint32  <a class="code" href="classOsclMemPoolResizableAllocator.html#n13">iRequestedAvailableFreeMemSize</a>;
184<a name="l00337"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n14">00337</a>         <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="classOsclMemPoolResizableAllocator.html#n14">iFreeMemContextData</a>;
185<a name="l00338"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n15">00338</a>         <a class="code" href="classOsclMemPoolResizableAllocatorMemoryObserver.html">OsclMemPoolResizableAllocatorMemoryObserver</a>* <a class="code" href="classOsclMemPoolResizableAllocator.html#n15">iFreeMemPoolObserver</a>;
18600339
187<a name="l00340"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n16">00340</a>         int32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n16">iRefCount</a>;
188<a name="l00341"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n17">00341</a>         <span class="keywordtype">bool</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#n17">iEnableNullPtrReturn</a>;
18900342         <span class="comment">//To compute the size of the buffer, excluding the extra memory in the buffer for its management</span>
19000343         uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#b7">getMemPoolBufferSize</a>(<a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html">MemPoolBufferInfo</a>* aBufferInfo) <span class="keyword">const</span>;
19100344         <span class="comment">//To compute the number of bytes allocated from the buffer</span>
19200345         uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#b8">getMemPoolBufferAllocatedSize</a>(<a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBufferInfo.html">MemPoolBufferInfo</a>* aBufferInfo) <span class="keyword">const</span>;
19300346         <span class="comment">//To compute the addition bytes which were allocated while createing the memory pool for the buffer.</span>
19400347         uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#b9">memoryPoolBufferMgmtOverhead</a>() <span class="keyword">const</span>;
19500348 };
19600349
19700350 <span class="preprocessor">#endif</span>
19800351 <span class="preprocessor"></span>
199</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
200<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
201</small></address>
202</body>
203</html>
204