• 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_mempool_allocator.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_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>
1000002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
1100003
1200004 <span class="comment">//               O S C L _ M E M P O O L _ A L L O C A T O R</span>
1300005
1400006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
1500007
1600018 <span class="comment">/***************************************************************************************</span>
1700019 <span class="comment">File Name               : oscl_mempool_allocator.h</span>
1800020 <span class="comment">Description             : File containing definition of class OsclMemPoolAllocator that provides</span>
1900021 <span class="comment">                                  methods for creating, deleting memory pool.</span>
2000022 <span class="comment">Coding History  :</span>
2100023 <span class="comment">                                  Achint Kaur                   April 11, 2006          Initial Draft</span>
2200024 <span class="comment">***************************************************************************************/</span>
2300025 <span class="preprocessor">#ifndef OSCL_MEMPOOL_ALLOCATOR_H_INCLUDED</span>
2400026 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_MEMPOOL_ALLOCATOR_H_INCLUDED</span>
2500027 <span class="preprocessor"></span>
2600028 <span class="preprocessor">#ifndef OSCL_DEFALLOC_H_INCLUDED</span>
2700029 <span class="preprocessor"></span><span class="comment">// For custom allocator Oscl_DefAlloc object</span>
2800030 <span class="preprocessor">#include "<a class="code" href="oscl__defalloc_8h.html">oscl_defalloc.h</a>"</span>
2900031 <span class="preprocessor">#endif</span>
3000032 <span class="preprocessor"></span>
31<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>
3200034 {
3300035     <span class="keyword">public</span>:
3400036         <span class="comment">// Constructor</span>
3500037         <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>);
3600038
3700039         <span class="comment">// Virtual destructor</span>
3800040         <span class="keyword">virtual</span> <a class="code" href="classOsclMemPoolAllocator.html#a1">~OsclMemPoolAllocator</a>();
3900041
4000042         <span class="comment">// Create memory pool</span>
4100043         <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);
4200044
4300045         <span class="comment">// Delete memory pool</span>
4400046         <span class="keywordtype">void</span> <a class="code" href="classOsclMemPoolAllocator.html#a3">DestroyMemPool</a>();
4500047
4600048         <span class="comment">// Memory alignment</span>
4700049         <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);
4800050
4900051     <span class="keyword">private</span>:
5000052         <span class="comment">// Custom allocator for memory</span>
5100053         <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>* iCustomAllocator;
5200054
5300055         <span class="comment">// Base address for memory pool</span>
5400056         <a class="code" href="group__osclbase.html#a25">OsclAny</a>* iBaseAddress;
5500057
5600058 };
5700059
5800060 <span class="preprocessor">#endif</span>
59</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
60<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
61</small></address>
62</body>
63</html>
64