All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HbrAllocator< T > Class Template Reference

#include <allocator.h>

Public Member Functions

 HbrAllocator (size_t *memorystat, int blocksize, void(*increment)(size_t bytes), void(*decrement)(size_t bytes), size_t elemsize=sizeof(T))
 Constructor. More...
 
 ~HbrAllocator ()
 Destructor. More...
 
T * Allocate ()
 Create an allocated object. More...
 
void Deallocate (T *)
 Return an allocated object to the block allocator. More...
 
void Clear ()
 Clear the allocator, deleting all allocated objects. More...
 
void SetMemStatsIncrement (void(*increment)(size_t bytes))
 
void SetMemStatsDecrement (void(*decrement)(size_t bytes))
 

Detailed Description

template<typename T>
class OpenSubdiv::OPENSUBDIV_VERSION::HbrAllocator< T >

HbrAllocator - derived from UtBlockAllocator.h, but embedded in libhbrep.

Definition at line 39 of file allocator.h.

Constructor & Destructor Documentation

HbrAllocator ( size_t *  memorystat,
int  blocksize,
void(*)(size_t bytes)  increment,
void(*)(size_t bytes)  decrement,
size_t  elemsize = sizeof(T) 
)

Constructor.

Definition at line 84 of file allocator.h.

Destructor.

Definition at line 89 of file allocator.h.

Member Function Documentation

T * Allocate ( )

Create an allocated object.

Definition at line 117 of file allocator.h.

void Clear ( )

Clear the allocator, deleting all allocated objects.

Definition at line 94 of file allocator.h.

void Deallocate ( T *  obj)

Return an allocated object to the block allocator.

Definition at line 160 of file allocator.h.

void SetMemStatsDecrement ( void(*)(size_t bytes)  decrement)
inline

Definition at line 60 of file allocator.h.

void SetMemStatsIncrement ( void(*)(size_t bytes)  increment)
inline

Definition at line 58 of file allocator.h.


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