Custom Allocator interface.
More...
#include <ICustomAllocator.hpp>
Inherited by SampleClBackendCustomAllocator.
Custom Allocator interface.
- Examples:
- CustomMemoryAllocatorSample.cpp.
Definition at line 15 of file ICustomAllocator.hpp.
◆ ~ICustomAllocator()
Default virtual destructor.
◆ allocate()
virtual void* allocate |
( |
size_t |
size, |
|
|
size_t |
alignment |
|
) |
| |
|
pure virtual |
Interface to be implemented by the child class to allocate bytes.
- Parameters
-
[in] | size | Size to allocate |
[in] | alignment | Alignment that the returned pointer should comply with |
- Returns
- A pointer to the allocated memory The returned pointer must be host write accessible
- Examples:
- CustomMemoryAllocatorSample.cpp.
◆ free()
virtual void free |
( |
void * |
ptr | ) |
|
|
pure virtual |
◆ GetMemorySourceType()
The documentation for this class was generated from the following file: