cAudio  2.3.0
3d Audio Engine
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
sizeSize of the memory chunk to allocate in bytes.
filenameFilename of the source file that this allocation took place in (in Debug) or NULL otherwise.
lineLine of the source file where this allocation took place (in Debug) or -1 otherwise.
functionFunction 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
pointerPointer to the memory location to free.

Implemented in cAudio::cStandardMemoryProvider.


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