Bullet Collision Detection & Physics Library
Public Types | Public Member Functions | Private Attributes | List of all members
HeapManager Class Reference

#include <HeapManager.h>

Public Types

enum  {
  ALIGN16,
  ALIGN128
}
 

Public Member Functions

 HeapManager (unsigned char *buf, int bytes)
 
 ~HeapManager ()
 
int getAllocated ()
 
int getRest ()
 
void * allocate (size_t bytes, int alignment=ALIGN16)
 
void deallocate (void *p)
 
void clear ()
 

Private Attributes

unsigned char * mHeap
 
unsigned int mHeapBytes
 
unsigned char * mPoolStack [64]
 
unsigned int mCurStack
 

Detailed Description

Definition at line 29 of file HeapManager.h.

Member Enumeration Documentation

anonymous enum
Enumerator
ALIGN16 
ALIGN128 

Definition at line 38 of file HeapManager.h.

Constructor & Destructor Documentation

HeapManager::HeapManager ( unsigned char *  buf,
int  bytes 
)
inline

Definition at line 40 of file HeapManager.h.

HeapManager::~HeapManager ( )
inline

Definition at line 47 of file HeapManager.h.

Member Function Documentation

void* HeapManager::allocate ( size_t  bytes,
int  alignment = ALIGN16 
)
inline

Definition at line 61 of file HeapManager.h.

void HeapManager::clear ( )
inline

Definition at line 101 of file HeapManager.h.

void HeapManager::deallocate ( void *  p)
inline

Definition at line 95 of file HeapManager.h.

int HeapManager::getAllocated ( )
inline

Definition at line 51 of file HeapManager.h.

int HeapManager::getRest ( )
inline

Definition at line 56 of file HeapManager.h.

Member Data Documentation

unsigned int HeapManager::mCurStack
private

Definition at line 35 of file HeapManager.h.

unsigned char* HeapManager::mHeap
private

Definition at line 32 of file HeapManager.h.

unsigned int HeapManager::mHeapBytes
private

Definition at line 33 of file HeapManager.h.

unsigned char* HeapManager::mPoolStack[64]
private

Definition at line 34 of file HeapManager.h.


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