blob: 84c5254bd806fccc9d25824aef871472ccf3f685 [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_mempool_allocator.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_mempool_allocator.h</h1><a href="oscl__mempool__allocator_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 P O O L _ A L L O C A T O R</span>
00005
00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00007
00018 <span class="comment">/***************************************************************************************</span>
00019 <span class="comment">File Name : oscl_mempool_allocator.h</span>
00020 <span class="comment">Description : File containing definition of class OsclMemPoolAllocator that provides</span>
00021 <span class="comment"> methods for creating, deleting memory pool.</span>
00022 <span class="comment">Coding History :</span>
00023 <span class="comment"> Achint Kaur April 11, 2006 Initial Draft</span>
00024 <span class="comment">***************************************************************************************/</span>
00025 <span class="preprocessor">#ifndef OSCL_MEMPOOL_ALLOCATOR_H_INCLUDED</span>
00026 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_MEMPOOL_ALLOCATOR_H_INCLUDED</span>
00027 <span class="preprocessor"></span>
00028 <span class="preprocessor">#ifndef OSCL_DEFALLOC_H_INCLUDED</span>
00029 <span class="preprocessor"></span><span class="comment">// For custom allocator Oscl_DefAlloc object</span>
00030 <span class="preprocessor">#include "<a class="code" href="oscl__defalloc_8h.html">oscl_defalloc.h</a>"</span>
00031 <span class="preprocessor">#endif</span>
00032 <span class="preprocessor"></span>
<a name="l00033"></a><a class="code" href="classOsclMemPoolAllocator.html">00033</a> <span class="keyword">class </span><a class="code" href="classOsclMemPoolAllocator.html">OsclMemPoolAllocator</a>
00034 {
00035 <span class="keyword">public</span>:
00036 <span class="comment">// Constructor</span>
00037 <a class="code" href="classOsclMemPoolAllocator.html#a0">OsclMemPoolAllocator</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>* gen_alloc = <a class="code" href="group__osclbase.html#a81">NULL</a>);
00038
00039 <span class="comment">// Virtual destructor</span>
00040 <span class="keyword">virtual</span> <a class="code" href="classOsclMemPoolAllocator.html#a1">~OsclMemPoolAllocator</a>();
00041
00042 <span class="comment">// Create memory pool</span>
00043 <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="classOsclMemPoolAllocator.html#a2">CreateMemPool</a>(<span class="keyword">const</span> uint32 aNumChunk = 2, <span class="keyword">const</span> uint32 aChunkSize = 4);
00044
00045 <span class="comment">// Delete memory pool</span>
00046 <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolAllocator.html#a3">DestroyMemPool</a>();
00047
00048 <span class="comment">// Memory alignment</span>
00049 <a class="code" href="group__osclbase.html#a27">uint</a> <a class="code" href="classOsclMemPoolAllocator.html#a4">oscl_mem_aligned_size</a>(<a class="code" href="group__osclbase.html#a27">uint</a> size);
00050
00051 <span class="keyword">private</span>:
00052 <span class="comment">// Custom allocator for memory</span>
00053 <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>* iCustomAllocator;
00054
00055 <span class="comment">// Base address for memory pool</span>
00056 <a class="code" href="group__osclbase.html#a25">OsclAny</a>* iBaseAddress;
00057
00058 };
00059
00060 <span class="preprocessor">#endif</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>