cAudio  2.3.0
3d Audio Engine
Public Member Functions | List of all members
cAudio::cStandardMemoryProvider Class Reference

Memory provider that wraps the standard memalloc and free. More...

#include <cStandardMemoryProvider.h>

Inheritance diagram for cAudio::cStandardMemoryProvider:
Inheritance graph
[legend]
Collaboration diagram for cAudio::cStandardMemoryProvider:
Collaboration graph
[legend]

Public Member Functions

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

Detailed Description

Memory provider that wraps the standard memalloc and free.

Definition at line 13 of file cStandardMemoryProvider.h.

Member Function Documentation

◆ Allocate()

void * cAudio::cStandardMemoryProvider::Allocate ( size_t  size,
const char *  filename,
int  line,
const char *  function 
)
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.

Implements cAudio::IMemoryProvider.

Definition at line 20 of file cStandardMemoryProvider.cpp.

◆ Free()

void cAudio::cStandardMemoryProvider::Free ( void *  pointer)
virtual

Frees memory previously allocated.

Parameters
pointerPointer to the memory location to free.

Implements cAudio::IMemoryProvider.

Definition at line 29 of file cStandardMemoryProvider.cpp.


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