2.9.16
Coherent GT
A modern user interface library for games
renoir::IAllocator Class Referenceabstract

Allocator interface used by Rendering Library for all memory allocations. The user has to provide an object that imlements this interface. More...

#include <Coherent/renoir/include/RenoirCore/CoherentRenderingLibrary.h>

Public Member Functions

virtual void * Allocate (unsigned size)=0
 Allocate size bytes. More...
 
virtual void * Reallocate (void *ptr, unsigned size)=0
 Reallocates the given area of memory. It must be previously allocated by Allocate. More...
 
virtual void Deallocate (void *ptr)=0
 Deallocates the memory previously allocated by Allocate. More...
 
virtual void * AlignedAllocate (unsigned size, unsigned alignment)=0
 Allocate size bytes whose alignment is specified by alignment. More...
 
virtual void AlignedDeallocate (void *ptr)=0
 Deallocates the memory previously allocated by AlignedAllocate. More...
 

Detailed Description

Allocator interface used by Rendering Library for all memory allocations. The user has to provide an object that imlements this interface.

Member Function Documentation

◆ AlignedAllocate()

virtual void* renoir::IAllocator::AlignedAllocate ( unsigned  size,
unsigned  alignment 
)
pure virtual

Allocate size bytes whose alignment is specified by alignment.

Parameters
sizenumber of bytes to allocate
alignmentspecifies the alignment
Returns
the pointer to the beginning of newly allocated memory.

◆ AlignedDeallocate()

virtual void renoir::IAllocator::AlignedDeallocate ( void *  ptr)
pure virtual

Deallocates the memory previously allocated by AlignedAllocate.

Parameters
ptrthe pointer to the memory to deallocate

◆ Allocate()

virtual void* renoir::IAllocator::Allocate ( unsigned  size)
pure virtual

Allocate size bytes.

Parameters
sizethe number of bytes to allocate
Returns
the pointer to the beginning of newly allocated memory.

◆ Deallocate()

virtual void renoir::IAllocator::Deallocate ( void *  ptr)
pure virtual

Deallocates the memory previously allocated by Allocate.

Parameters
ptrthe pointer to the memory to deallocate

◆ Reallocate()

virtual void* renoir::IAllocator::Reallocate ( void *  ptr,
unsigned  size 
)
pure virtual

Reallocates the given area of memory. It must be previously allocated by Allocate.

Parameters
ptrthe pointer to the memory area to be reallocated
sizenumber of bytes to allocate