renoir::IAllocator
Allocator interface used by Rendering Library for all memory allocations. The user has to provide an object that implements this interface.
#include <CoherentRenderingLibrary.h>
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| virtual void * | Allocate(unsigned size) =0 Allocate size bytes. |
| virtual void * | Reallocate(void * ptr, unsigned size) =0 Reallocates the given area of memory. It must be previously allocated by Allocate. |
| virtual void | Deallocate(void * ptr) =0 Deallocates the memory previously allocated by Allocate. |
| virtual void * | AlignedAllocate(unsigned size, unsigned alignment) =0 Allocate size bytes whose alignment is specified by alignment. |
| virtual void | AlignedDeallocate(void * ptr) =0 Deallocates the memory previously allocated by AlignedAllocate. |
| virtual | ~IAllocator() |
| IAllocator() |
Public Functions Documentation
Section titled “Public Functions Documentation”function Allocate
Section titled “function Allocate”virtual void * Allocate( unsigned size) =0Allocate size bytes.
Parameters:
- size the number of bytes to allocate
Return: the pointer to the beginning of newly allocated memory.
function Reallocate
Section titled “function Reallocate”virtual void * Reallocate( void * ptr, unsigned size) =0Reallocates the given area of memory. It must be previously allocated by Allocate.
Parameters:
- ptr the pointer to the memory area to be reallocated
- size number of bytes to allocate
function Deallocate
Section titled “function Deallocate”virtual void Deallocate( void * ptr) =0Deallocates the memory previously allocated by Allocate.
Parameters:
- ptr the pointer to the memory to deallocate
function AlignedAllocate
Section titled “function AlignedAllocate”virtual void * AlignedAllocate( unsigned size, unsigned alignment) =0Allocate size bytes whose alignment is specified by alignment.
Parameters:
- size number of bytes to allocate
- alignment specifies the alignment
Return: the pointer to the beginning of newly allocated memory.
function AlignedDeallocate
Section titled “function AlignedDeallocate”virtual void AlignedDeallocate( void * ptr) =0Deallocates the memory previously allocated by AlignedAllocate.
Parameters:
- ptr the pointer to the memory to deallocate
function ~IAllocator
Section titled “function ~IAllocator”virtual ~IAllocator()function IAllocator
Section titled “function IAllocator”IAllocator()© 2026 Coherent Labs. All rights reserved.