EGmemPool_t Struct Reference
[EGmemPool]

#include <eg_mempool.h>


Detailed Description

this structure holds a memory pool
Examples:

eg_net.ex.c.

Definition at line 201 of file eg_mempool.h.

Data Fields

size_t allocMem
unsigned int cBigBlocks [__EG_MEMPOOL_N_BIG_CHUNKS__]
size_t * curUsedMem
void * freeArrayHead
size_t freeArraySize
void ** freedMemory
size_t manageLimit
size_t maxBlock
const char * maxBlockFile
int maxBlockLine
size_t * maxUsedMem
const char * memAllocationFile
int memAllocationLine
void ** MemoryList
size_t MemoryListSize
unsigned int nBigBlocks [__EG_MEMPOOL_N_BIG_CHUNKS__]
size_t(* newsize )(size_t)
size_t nNullAlloc
size_t noManageMem
const char * nullAllocFile
int nullAllocLine
unsigned int sBigBlocks [__EG_MEMPOOL_N_BIG_CHUNKS__]
size_t totalMem


Field Documentation

size_t EGmemPool_t::allocMem
 

total amount of memory alloc'ed from the pool

Definition at line 255 of file eg_mempool.h.

unsigned int EGmemPool_t::cBigBlocks[__EG_MEMPOOL_N_BIG_CHUNKS__]
 

Definition at line 247 of file eg_mempool.h.

size_t* EGmemPool_t::curUsedMem
 

memory currently in use per size

Definition at line 267 of file eg_mempool.h.

void* EGmemPool_t::freeArrayHead
 

the memory is stored in two ways, we have an array of memory from were we return to the system, but if we run out of these memory we look to the 'freed' memory and if that is empty we alloc another array of memory. This pointer points to the begining of the 'freeArray'

Definition at line 216 of file eg_mempool.h.

size_t EGmemPool_t::freeArraySize
 

how many bytes are free in the freeArray

Definition at line 219 of file eg_mempool.h.

void** EGmemPool_t::freedMemory
 

this array store list of 'freed' memory, the lists are indexed acording to the size of the memory freed (discretized by the size of (void*) )

Definition at line 224 of file eg_mempool.h.

size_t EGmemPool_t::manageLimit
 

this define up to what size of memory we manage through the pool, if we ask the pool for memory over this size the pool will only call malloc/free

Definition at line 229 of file eg_mempool.h.

size_t EGmemPool_t::maxBlock
 

maximum non managed block of memory asked to the pool

Definition at line 242 of file eg_mempool.h.

const char* EGmemPool_t::maxBlockFile
 

Definition at line 243 of file eg_mempool.h.

int EGmemPool_t::maxBlockLine
 

Definition at line 244 of file eg_mempool.h.

size_t* EGmemPool_t::maxUsedMem
 

maximum memory alloc'ed at the same time per size

Definition at line 264 of file eg_mempool.h.

const char* EGmemPool_t::memAllocationFile
 

where (which file) the pool was created

Definition at line 238 of file eg_mempool.h.

int EGmemPool_t::memAllocationLine
 

where (which line) the pool was created

Definition at line 239 of file eg_mempool.h.

void** EGmemPool_t::MemoryList
 

and array of size MemoryListSize that contains a pointer to each memory chunk that we have alloc'ed

Definition at line 206 of file eg_mempool.h.

size_t EGmemPool_t::MemoryListSize
 

store the size of MemoryList

Definition at line 209 of file eg_mempool.h.

unsigned int EGmemPool_t::nBigBlocks[__EG_MEMPOOL_N_BIG_CHUNKS__]
 

Definition at line 245 of file eg_mempool.h.

size_t(* EGmemPool_t::newsize)(size_t)
 

a function that return the size (in bytes) of the i-th memory block

size_t EGmemPool_t::nNullAlloc
 

null alloc information

Definition at line 250 of file eg_mempool.h.

size_t EGmemPool_t::noManageMem
 

memory alloc'ed by the pool but not managed

Definition at line 261 of file eg_mempool.h.

const char* EGmemPool_t::nullAllocFile
 

Definition at line 251 of file eg_mempool.h.

int EGmemPool_t::nullAllocLine
 

Definition at line 252 of file eg_mempool.h.

unsigned int EGmemPool_t::sBigBlocks[__EG_MEMPOOL_N_BIG_CHUNKS__]
 

Definition at line 246 of file eg_mempool.h.

size_t EGmemPool_t::totalMem
 

memory really alloc'ed by the pool

Definition at line 258 of file eg_mempool.h.


The documentation for this struct was generated from the following file:
Generated on Mon Jan 30 08:55:09 2006 for EGlib by  doxygen 1.4.5