Memory Manager Library


Defines

#define pgeMalloc(size)   pgeMemoryAlloc(size, __FILE__, __LINE__)
#define pgeFree(address)   pgeMemoryFree(address, __FILE__, __LINE__)

Functions

int pgeMemoryInit (void)
void * pgeMemoryAlloc (unsigned int size, const char *file, const unsigned int line)
void pgeMemoryFree (void *address, const char *file, const unsigned int line)
void pgeMemoryShutdown (void)
int pgeMemoryCheck (void)
unsigned int pgeMemoryUsage (void)

Define Documentation

#define pgeFree ( address   )     pgeMemoryFree(address, __FILE__, __LINE__)

Free allocated memory

Parameters:
address - The memory to free..

#define pgeMalloc ( size   )     pgeMemoryAlloc(size, __FILE__, __LINE__)

Allocate memory

Parameters:
size - Size of memory to allocate.
Returns:
A pointer to the allocated memory.


Function Documentation

void* pgeMemoryAlloc ( unsigned int  size,
const char *  file,
const unsigned int  line 
)

Used internally by pgeMalloc. Ignore.

int pgeMemoryCheck ( void   ) 

Check memory for corruption

Returns:
1 if memory is corrupt.

void pgeMemoryFree ( void *  address,
const char *  file,
const unsigned int  line 
)

Used internally by pgeFree. Ignore.

int pgeMemoryInit ( void   ) 

Initialise the Memory manager

Returns:
1 on success.

void pgeMemoryShutdown ( void   ) 

Shutdown the Memory manager

unsigned int pgeMemoryUsage ( void   ) 

Get memory usage

Returns:
The total amount of memory currently allocated.


Generated on Tue May 15 07:21:01 2007 for Phoenix Game Engine by  doxygen 1.5.2