Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6heappool.h
Go to the documentation of this file.
1 
15 #ifndef P6HEAPPOOL_H__
16 #define P6HEAPPOOL_H__ 1
17 
18 #include "p6mempool.h"
19 
20 namespace P6R {
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
33  typedef struct {
41  } P6HEAPPOOLENT;
42 
43  typedef struct {
53 
54  interface p6IHeapPool : p6ICom
55  {
73  P6COMMETHOD initialize(P6R::P6HEAPPOOLENT *pPooDef,P6R::P6UINT32 cPoolDef,P6R::MEMPOOLFLGS fFlags,const P6R::P6WCHAR *pszName) = 0;
74 
89  P6COMMETHOD alloc(P6R::P6SIZE nBytes,P6R::P6VOID **ppMem) = 0;
90 
101  P6COMMETHOD free(P6R::P6VOID *pMem) = 0;
102 
103 
105 
106  };
107 
108  // {C5CF1068-A704-4A74-B619-640196B05CE8}
109  #define IF_p6IHeapPool {0xC5CF1068,0xA704,0x4A74,{0xB6,0x19,0x64,0x01,0x96,0xB0,0x5C,0xE8}}
110 
111  // {F431B1E6-8EAE-4AE9-8F65-8F5DC451DB08}
112  #define COMP_p6HeapPool {0xF431B1E6,0x8EAE,0x4AE9,{0x8F,0x65,0x8F,0x5D,0xC4,0x51,0xDB,0x08}}
113 
114 #ifdef __cplusplus
115 }
116 #endif
117 
118 } // namespace
119 
120 #endif
121 
122 
123 
124 
size_t P6SIZE
Definition: p6types.h:62
P6R::P6UINT32 cGrowby
Definition: p6heappool.h:48
P6R::P6UINT32 cFree
Definition: p6heappool.h:50
P6R::P6UINT32 cInitialCount
The initial number of allocation units to allocate.
Definition: p6heappool.h:35
unsigned int P6UINT32
Definition: p6types.h:40
P6R::P6UINT32 MEMPOOLFLGS
Definition: p6mempool.h:32
An array of these structures are passed to p6IHeapPool::initialize(), each element of which defines t...
Definition: p6heappool.h:33
virtual P6R::P6ERR initialize(P6R::P6HEAPPOOLENT *pPooDef, P6R::P6UINT32 cPoolDef, P6R::MEMPOOLFLGS fFlags, const P6R::P6WCHAR *pszName)=0
Initialize the heap pool for use.
P6R::P6UINT32 cBlockSize
The size in bytes of the allocation unit this pool will use.
Definition: p6heappool.h:34
P6R::P6UINT32 cBlock
Definition: p6heappool.h:45
P6R::P6UINT32 cInitial
Definition: p6heappool.h:47
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:76
P6R::P6UINT32 cTotal
Definition: p6heappool.h:49
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
virtual P6R::P6ERR free(P6R::P6VOID *pMem)=0
Return the specfied allocation unit back to the heap pool.
virtual P6R::P6ERR getstats(P6R::P6HEAPPOOLSTATSENT *pStats, P6R::P6UINT32 *pcStats)=0
virtual P6R::P6ERR alloc(P6R::P6SIZE nBytes, P6R::P6VOID **ppMem)=0
Allocs memory from the heap pool.
#define P6MEMPOOL_NAME_MAX
Definition: p6mempool.h:27
P6R::P6UINT32 cActual
Definition: p6heappool.h:46
#define P6COMMETHOD
Definition: p6types.h:872
P6R::P6UINT32 cHighWater
Definition: p6heappool.h:51
Fixed-size, pool based, memory allocator.
void P6VOID
Definition: p6types.h:75
P6R::P6UINT32 cGrowBy
The number of allocation units to grow the pool by if it runs out of allocation units.
Definition: p6heappool.h:36