Nv::Blast::AllocatorCallback Class Reference

Abstract base class for an application defined memory allocator that can be used by toolkit (Tk) or any extension (Ext). More...

#include <NvBlastGlobals.h>

List of all members.

Public Member Functions

virtual void * allocate (size_t size, const char *typeName, const char *filename, int line)=0
 Allocates size bytes of memory, which must be 16-byte aligned.
virtual void deallocate (void *ptr)=0
 Frees memory previously allocated by allocate().
virtual ~AllocatorCallback ()
 destructor


Detailed Description

Abstract base class for an application defined memory allocator that can be used by toolkit (Tk) or any extension (Ext).

Constructor & Destructor Documentation

virtual Nv::Blast::AllocatorCallback::~AllocatorCallback (  )  [inline, virtual]

destructor


Member Function Documentation

virtual void* Nv::Blast::AllocatorCallback::allocate ( size_t  size,
const char *  typeName,
const char *  filename,
int  line 
) [pure virtual]

Allocates size bytes of memory, which must be 16-byte aligned.

This method should never return NULL. If you run out of memory, then you should terminate the app or take some other appropriate action.

Parameters:
size Number of bytes to allocate.
typeName Name of the datatype that is being allocated
filename The source file which allocated the memory
line The source line which allocated the memory
Returns:
The allocated block of memory.

virtual void Nv::Blast::AllocatorCallback::deallocate ( void *  ptr  )  [pure virtual]

Frees memory previously allocated by allocate().

Parameters:
ptr Memory to free.


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