cAudio  2.3.0
3d Audio Engine
 All Classes Namespaces Functions Variables Enumerations Pages
Public Member Functions | List of all members
cAudio::IMemoryProvider Class Referenceabstract

Interface for a class that allocates and frees memory used by cAudio. More...

#include <IMemoryProvider.h>

Inheritance diagram for cAudio::IMemoryProvider:
Inheritance graph
[legend]

Public Member Functions

virtual void * Allocate (size_t size, const char *filename, int line, const char *function)=0
 Allocates memory and returns a pointer to it. More...
 
virtual void Free (void *pointer)=0
 Frees memory previously allocated. More...
 
virtual size_t getMaxAllocationSize ()=0
 Returns the largest possible single allocation that can be made.
 

Detailed Description

Interface for a class that allocates and frees memory used by cAudio.

Definition at line 12 of file IMemoryProvider.h.

Member Function Documentation

virtual void* cAudio::IMemoryProvider::Allocate ( size_t  size,
const char *  filename,
int  line,
const char *  function 
)
pure virtual

Allocates memory and returns a pointer to it.

Parameters
size,:Size of the memory chunk to allocate in bytes.
filename,:Filename of the source file that this allocation took place in (in Debug) or NULL otherwise.
line,:Line of the source file where this allocation took place (in Debug) or -1 otherwise.
function,:Function that this allocation took place in (in Debug) or NULL otherwise.
Returns
Pointer to the allocated memory or NULL if allocation failed.

Implemented in cAudio::cStandardMemoryProvider.

virtual void cAudio::IMemoryProvider::Free ( void *  pointer)
pure virtual

Frees memory previously allocated.

Parameters
pointer,:Pointer to the memory location to free.

Implemented in cAudio::cStandardMemoryProvider.


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