Blender V2.61 - r43446
Public Member Functions

MemoryAllocator< N > Class Template Reference

#include <MemoryAllocator.h>

Inheritance diagram for MemoryAllocator< N >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 MemoryAllocator ()
void destroy ()
UCHAR * allocate ()
void deallocate (UCHAR *obj)
void printInfo ()
int getAllocated ()
int getAll ()
int getBytes ()

Detailed Description

template<int N>
class MemoryAllocator< N >

Dynamic memory allocator - allows allocation/deallocation

Note: there are 4 bytes overhead for each allocated yet unused object.

Definition at line 62 of file MemoryAllocator.h.


Constructor & Destructor Documentation

template<int N>
MemoryAllocator< N >::MemoryAllocator ( ) [inline]

Constructor

Definition at line 122 of file MemoryAllocator.h.

References HEAP_BASE, i, N, and UCHAR.


Member Function Documentation

template<int N>
UCHAR* MemoryAllocator< N >::allocate ( ) [inline, virtual]

Allocation method

Implements VirtualMemoryAllocator.

Definition at line 164 of file MemoryAllocator.h.

References HEAP_BASE.

template<int N>
void MemoryAllocator< N >::deallocate ( UCHAR *  obj) [inline, virtual]

De-allocation method

Implements VirtualMemoryAllocator.

Definition at line 179 of file MemoryAllocator.h.

References HEAP_BASE.

template<int N>
void MemoryAllocator< N >::destroy ( ) [inline, virtual]

Destructor

Implements VirtualMemoryAllocator.

Definition at line 146 of file MemoryAllocator.h.

References addon::engine::free(), and i.

template<int N>
int MemoryAllocator< N >::getAll ( ) [inline, virtual]

Implements VirtualMemoryAllocator.

Definition at line 208 of file MemoryAllocator.h.

Referenced by MemoryAllocator< N >::printInfo().

template<int N>
int MemoryAllocator< N >::getAllocated ( ) [inline, virtual]

Query methods

Implements VirtualMemoryAllocator.

Definition at line 203 of file MemoryAllocator.h.

Referenced by MemoryAllocator< N >::printInfo().

template<int N>
int MemoryAllocator< N >::getBytes ( ) [inline, virtual]

Implements VirtualMemoryAllocator.

Definition at line 213 of file MemoryAllocator.h.

References N.

Referenced by MemoryAllocator< N >::printInfo().

template<int N>
void MemoryAllocator< N >::printInfo ( ) [inline, virtual]

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