Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

OsclErrorAllocator Class Reference
[OSCL Error]

This class provides static methods to invoke the user defined memory allocation routines. More...

#include <oscl_error_allocator.h>


Public Methods

 OsclErrorAllocator (Oscl_DefAlloc *allocator)
 constructor method

void * operator new (uint32 size, OsclAny *aPtr)
 placement new operator that allocates memory using the user defined methods

void operator delete (OsclAny *aPtr, OsclAny *aPtr2)
 delete operator that doesn't do anything, user has to deallocate manually


Static Public Methods

OsclAnyallocate (uint32 aSize)
 static method to allocate a block of memory on heap

OsclAny deallocate (OsclAny *aPointer)
 static method to deallocate a block of memory on heap


Detailed Description

This class provides static methods to invoke the user defined memory allocation routines.

This class must be instantiated before the static methods are called, else asserts will happen


Constructor & Destructor Documentation

OsclErrorAllocator::OsclErrorAllocator Oscl_DefAlloc   allocator [inline]
 

constructor method

Parameters:
allocator  - a pointer to the concrete object that provides the allocator/deallocator


Member Function Documentation

OsclAny* OsclErrorAllocator::allocate uint32    aSize [inline, static]
 

static method to allocate a block of memory on heap

Parameters:
aSize  - number of bytes to allocate

OsclAny OsclErrorAllocator::deallocate OsclAny   aPointer [inline, static]
 

static method to deallocate a block of memory on heap

Parameters:
aPointer  - pointer to block of memory to be deallocated

void OsclErrorAllocator::operator delete OsclAny   aPtr,
OsclAny   aPtr2
[inline]
 

delete operator that doesn't do anything, user has to deallocate manually

void* OsclErrorAllocator::operator new uint32    size,
OsclAny   aPtr
[inline]
 

placement new operator that allocates memory using the user defined methods


The documentation for this class was generated from the following file:
OSCL API
Posting Version: OPENCORE_20090310