ML Reference
MLMemoryAllocator Class Reference

The memory allocator used by the memory manager. More...

#include <mlMemoryAllocator.h>

List of all members.

Public Member Functions

 ~MLMemoryAllocator ()
 Destroys the memory allocator.

Static Public Member Functions

static void initialize (MLAllocationCallback allocationCallback, void *allocationCallbackUserData, MLDeallocationCallback deallocationCallback, void *deallocationCallbackUserData)
 Initializes the memory allocator.
static void deinitialize ()
 Deinitializes the memory allocator.
static MLMemoryAllocatorsingleton ()
 Returns the memory allocator singleton.

Detailed Description

The memory allocator used by the memory manager.

Definition at line 34 of file mlMemoryAllocator.h.


Constructor & Destructor Documentation

MLMemoryAllocator::~MLMemoryAllocator ( )

Destroys the memory allocator.


Member Function Documentation

static void MLMemoryAllocator::deinitialize ( ) [static]

Deinitializes the memory allocator.

static void MLMemoryAllocator::initialize ( MLAllocationCallback  allocationCallback,
void *  allocationCallbackUserData,
MLDeallocationCallback  deallocationCallback,
void *  deallocationCallbackUserData 
) [static]

Initializes the memory allocator.

This may be called only once, so that it is assured that only one allocator is used throughout an application.

Parameters:
allocationCallbackThe callback function to allocate memory
allocationCallbackUserDataThe pointer to user data for the allocation callback. It can be NULL if it is not required.
deallocationCallbackThe callback function to deallocate memory
deallocationCallbackUserDataThe pointer to user data for the deallocation callback. It can be NULL if it is not required.
static MLMemoryAllocator* MLMemoryAllocator::singleton ( ) [static]

Returns the memory allocator singleton.


The documentation for this class was generated from the following file: