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>
|
| 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...
|
| |
Allocator interface used by Rendering Library for all memory allocations. The user has to provide an object that imlements this interface.
◆ AlignedAllocate()
| virtual void* renoir::IAllocator::AlignedAllocate |
( |
unsigned |
size, |
|
|
unsigned |
alignment |
|
) |
| |
|
pure virtual |
Allocate size bytes whose alignment is specified by alignment.
- Parameters
-
| size | number of bytes to allocate |
| alignment | specifies 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
-
| ptr | the pointer to the memory to deallocate |
◆ Allocate()
| virtual void* renoir::IAllocator::Allocate |
( |
unsigned |
size | ) |
|
|
pure virtual |
Allocate size bytes.
- Parameters
-
| size | the 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
-
| ptr | the 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
-
| ptr | the pointer to the memory area to be reallocated |
| size | number of bytes to allocate |