AGXDynamics  2.31.1.0
agx::Allocator< T > Class Template Reference

Templated allocator. More...

#include <Allocator.h>

+ Inheritance diagram for agx::Allocator< T >:

Public Member Functions

 Allocator (const char *name="Allocator")
 
T * allocate (size_t numElements)
 Allocate/deallocate raw memory. More...
 
void * allocateBytes (size_t numBytes, size_t alignment=16)
 Allocate a memory section of specified alignment. More...
 
void deallocate (T *buffer)
 
void deallocateBytes (void *buffer, size_t numBytes)
 Deallocate a section previously allocated using allocateBytes method. More...
 
void deallocateBytes (void *buffer)
 
const char * getName () const
 
void setContainer (class Container *)
 

Static Public Member Functions

static void initMemory (void *data, size_t numBytes, agx::UInt32 pattern)
 
static void * standaloneAllocateBytes (size_t numBytes, size_t alignment=16)
 
static void standaloneDeallocateTypes (void *buffer)
 

Static Public Attributes

static agx::UInt32 allocatedMemoryPattern
 
static agx::UInt32 deallocatedMemoryPattern
 
static bool initMemoryFlag
 

Detailed Description

template<typename T>
class agx::Allocator< T >

Templated allocator.

Definition at line 106 of file Allocator.h.

Constructor & Destructor Documentation

◆ Allocator()

template<typename T >
agx::Allocator< T >::Allocator ( const char *  name = "Allocator< T >")
inline

Definition at line 179 of file Allocator.h.

Member Function Documentation

◆ allocate()

template<typename T >
T * agx::Allocator< T >::allocate ( size_t  numElements)

Allocate/deallocate raw memory.

Definition at line 185 of file Allocator.h.

References agx::ByteAllocator::allocateBytes().

◆ allocateBytes()

void* agx::ByteAllocator::allocateBytes ( size_t  numBytes,
size_t  alignment = 16 
)
inherited

◆ deallocate()

template<typename T >
void agx::Allocator< T >::deallocate ( T *  buffer)

Definition at line 191 of file Allocator.h.

References agx::ByteAllocator::deallocateBytes().

◆ deallocateBytes() [1/2]

◆ deallocateBytes() [2/2]

void agx::ByteAllocator::deallocateBytes ( void *  buffer)
inherited

Definition at line 173 of file Allocator.h.

◆ getName()

const char * agx::ByteAllocator::getName ( ) const
inherited
Returns
The name

Definition at line 164 of file Allocator.h.

◆ initMemory()

static void agx::ByteAllocator::initMemory ( void *  data,
size_t  numBytes,
agx::UInt32  pattern 
)
staticinherited

◆ setContainer()

◆ standaloneAllocateBytes()

static void* agx::ByteAllocator::standaloneAllocateBytes ( size_t  numBytes,
size_t  alignment = 16 
)
staticinherited

◆ standaloneDeallocateTypes()

static void agx::ByteAllocator::standaloneDeallocateTypes ( void *  buffer)
staticinherited

Member Data Documentation

◆ allocatedMemoryPattern

agx::UInt32 agx::ByteAllocator::allocatedMemoryPattern
staticinherited

Definition at line 79 of file Allocator.h.

◆ deallocatedMemoryPattern

agx::UInt32 agx::ByteAllocator::deallocatedMemoryPattern
staticinherited

Definition at line 80 of file Allocator.h.

◆ initMemoryFlag

bool agx::ByteAllocator::initMemoryFlag
staticinherited

Definition at line 78 of file Allocator.h.


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