blob: d91bfc0d09b105ce236fe3532b77b128adbda14e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>oscl_mem_mempool.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<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>
<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>
00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00003
00004 <span class="comment">// O S C L _ M E M _ M E M P O O L</span>
00005
00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00007
00019 <span class="preprocessor">#ifndef OSCL_MEM_MEMPOOL_H_INCLUDED</span>
00020 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_MEM_MEMPOOL_H_INCLUDED</span>
00021 <span class="preprocessor"></span>
00022 <span class="preprocessor">#ifndef OSCL_MEM_H_INCLUDED</span>
00023 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__mem_8h.html">oscl_mem.h</a>"</span>
00024 <span class="preprocessor">#endif</span>
00025 <span class="preprocessor"></span>
00026 <span class="preprocessor">#ifndef OSCL_DEFALLOC_H_INCLUDED</span>
00027 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__defalloc_8h.html">oscl_defalloc.h</a>"</span>
00028 <span class="preprocessor">#endif</span>
00029 <span class="preprocessor"></span>
00030 <span class="preprocessor">#ifndef OSCL_VECTOR_H_INCLUDED</span>
00031 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__vector_8h.html">oscl_vector.h</a>"</span>
00032 <span class="preprocessor">#endif</span>
00033 <span class="preprocessor"></span>
00034
<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>
00042 {
00043 <span class="keyword">public</span>:
00044 <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;
<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>() {}
00046 };
00047
00048
<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>
00050 {
00051 <span class="keyword">public</span>:
00060 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>);
00061
00069 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a1">enablenullpointerreturn</a>();
00070
00073 OSCL_IMPORT_REF <span class="keyword">virtual</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a2">~OsclMemPoolFixedChunkAllocator</a>();
00074
00083 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);
00084
00091 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);
00092
00099 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>);
00100
00106 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a6">CancelFreeChunkAvailableCallback</a>();
00107
00113 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a7">addRef</a>();
00114
00121 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#a8">removeRef</a>();
00122
00123 <span class="keyword">protected</span>:
00124 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#b0">createmempool</a>();
00125 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#b1">destroymempool</a>();
00126
<a name="l00127"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n0">00127</a> uint32 <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n0">iNumChunk</a>;
<a name="l00128"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n1">00128</a> uint32 <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n1">iChunkSize</a>;
<a name="l00129"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n2">00129</a> uint32 <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n2">iChunkSizeMemAligned</a>;
<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>;
<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>;
00132
<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>;
00134
<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>;
<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>;
<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>;
00138
<a name="l00139"></a><a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n9">00139</a> int32 <a class="code" href="classOsclMemPoolFixedChunkAllocator.html#n9">iRefCount</a>;
<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>;
00141 };
00142
00143
<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>
00154 {
00155 <span class="keyword">public</span>:
00156 <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;
<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>() {}
00158 };
00159
<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>
00161 {
00162 <span class="keyword">public</span>:
00163 <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;
<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>() {}
00165 };
00166
<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>
00168 {
00169 <span class="keyword">public</span>:
00182 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>);
00183
00191 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a1">enablenullpointerreturn</a>();
00192
00200 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);
00201
00208 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);
00209
00222 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);
00223
00226 OSCL_IMPORT_REF uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#a5">getBufferSize</a>() <span class="keyword">const</span>;
00227
00231 OSCL_IMPORT_REF <span class="keyword">virtual</span> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#a6">getAllocatedSize</a>() <span class="keyword">const</span>;
00232
00235 OSCL_IMPORT_REF <span class="keyword">virtual</span> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#a7">getAvailableSize</a>() <span class="keyword">const</span>;
00236
00239 OSCL_IMPORT_REF <span class="keyword">virtual</span> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#a8">getLargestContiguousFreeBlockSize</a>() <span class="keyword">const</span>;
00240
00241 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a9">setMaxSzForNewMemPoolBuffer</a>(uint32 aMaxNewMemPoolBufferSz);
00242
00254 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>);
00255
00261 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a11">CancelFreeChunkAvailableCallback</a>();
00262
00263 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>);
00264 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a13">CancelFreeMemoryAvailableCallback</a>();
00265
00271 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a14">addRef</a>();
00272
00279 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#a15">removeRef</a>();
00280
00281
00282 <span class="keyword">struct </span><a class="code" href="structOsclMemPoolResizableAllocator_1_1MemPoolBlockInfo.html">MemPoolBlockInfo</a>;
00283
<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>
00285 {
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
00294 };
00295
<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>
00297 {
<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>
<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>
<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>
<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>
<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>
<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>
<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>
00305 };
00306
00307 <span class="keyword">protected</span>:
00308
00311 OSCL_IMPORT_REF <span class="keyword">virtual</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#b0">~OsclMemPoolResizableAllocator</a>();
00312
00313 MemPoolBufferInfo* <a class="code" href="classOsclMemPoolResizableAllocator.html#b1">addnewmempoolbuffer</a>(uint32 aBufferSize);
00314 <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#b2">destroyallmempoolbuffers</a>();
00315 MemPoolBlockInfo* <a class="code" href="classOsclMemPoolResizableAllocator.html#b3">findfreeblock</a>(uint32 aBlockSize);
00316 <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="classOsclMemPoolResizableAllocator.html#b4">allocateblock</a>(MemPoolBlockInfo&amp; aBlockPtr, uint32 aNumBytes);
00317 <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolResizableAllocator.html#b5">deallocateblock</a>(MemPoolBlockInfo&amp; aBlockPtr);
00318 <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);
00319
<a name="l00320"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n0">00320</a> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n0">iMemPoolBufferSize</a>;
<a name="l00321"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n1">00321</a> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n1">iMemPoolBufferNumLimit</a>;
<a name="l00322"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n2">00322</a> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n2">iExpectedNumBlocksPerBuffer</a>;
<a name="l00323"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n3">00323</a> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n3">iMaxNewMemPoolBufferSz</a>;
<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>;
<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>;
00326
<a name="l00327"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n6">00327</a> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n6">iBufferInfoAlignedSize</a>;
<a name="l00328"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n7">00328</a> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n7">iBlockInfoAlignedSize</a>;
00329
<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>;
<a name="l00331"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n9">00331</a> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n9">iRequestedNextAvailableSize</a>;
<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>;
<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>;
00334
<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>;
<a name="l00336"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n13">00336</a> uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n13">iRequestedAvailableFreeMemSize</a>;
<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>;
<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>;
00339
<a name="l00340"></a><a class="code" href="classOsclMemPoolResizableAllocator.html#n16">00340</a> int32 <a class="code" href="classOsclMemPoolResizableAllocator.html#n16">iRefCount</a>;
<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>;
00342 <span class="comment">//To compute the size of the buffer, excluding the extra memory in the buffer for its management</span>
00343 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>;
00344 <span class="comment">//To compute the number of bytes allocated from the buffer</span>
00345 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>;
00346 <span class="comment">//To compute the addition bytes which were allocated while createing the memory pool for the buffer.</span>
00347 uint32 <a class="code" href="classOsclMemPoolResizableAllocator.html#b9">memoryPoolBufferMgmtOverhead</a>() <span class="keyword">const</span>;
00348 };
00349
00350 <span class="preprocessor">#endif</span>
00351 <span class="preprocessor"></span>
</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>