include/MemoryFunctions.hpp File Reference

contains some template wrappers to make malloc easier and better to work with and some functions about memory usage. More...

#include <new>
#include <unistd.h>


Namespaces

namespace  DSOL
 the master namespace of the library. every class, function and variable will be in this namespace.

Functions

template<typename T >
T * DSOL::allocMem (const T value=T(), const uint length=1)
 a template function to allocate memory.
template<typename T >
T * DSOL::allocMemNoError (const T value=T(), const uint length=1)
 a template function to allocate memory.
template<typename T >
T * DSOL::allocRawMem (const uint length=1)
 a template function to allocate raw memory.
template<typename T >
T * DSOL::allocRawMemNoError (const uint length=1)
 a template function to allocate raw memory.
template<typename T >
void DSOL::deallocMem (T *&oldMemPointer, const uint oldLength=1)
 a template function to deallocate memory.
template<typename T >
void DSOL::deallocMemNoError (T *&oldMemPointer, const uint oldLength)
 a template function to deallocate memory.
template<typename T >
void DSOL::deallocRawMem (T *&oldMemPointer)
 a template function to deallocate raw memory.
template<typename T >
void DSOL::deallocRawMemNoError (T *&oldMemPointer)
 a template function to deallocate raw memory.
static u8 * DSOL::getHeapEnd ()
 returns a pointer to the end of the heap.
static u8 * DSOL::getHeapLimit ()
 returns a pointer to the limit of the heap.
static u8 * DSOL::getHeapStart ()
 returns a pointer to the start of the heap.
static int DSOL::getMemFree ()
 returns the amount of memory free.
static int DSOL::getMemUsed ()
 returns the amount of memory used.
template<typename T >
T * DSOL::reallocMem (T *oldMemPointer, const uint oldLength, const uint length=1, const T value=T())
 a template function to reallocate memory.
template<typename T >
T * DSOL::reallocMemNoError (T *oldMemPointer, const uint oldLength, const T value=T(), const uint length=1)
 a template function to reallocate memory.
template<typename T >
T * DSOL::reallocRawMem (T *oldMemPointer, const uint length=1)
 a template function to reallocate raw memory.
template<typename T >
T * DSOL::reallocRawMemNoError (T *oldMemPointer, const uint length=1)
 a template function to reallocate raw memory.


Detailed Description

contains some template wrappers to make malloc easier and better to work with and some functions about memory usage.


Generated on Thu Sep 10 19:09:46 2009 for DSOL by  doxygen 1.5.8