Allocator concept to be used for memory management and is used as part of the Blob. More...
#include <ie_allocator.hpp>
Public Member Functions | |
virtual void * | lock (void *handle, LockOp op=LOCK_FOR_WRITE) noexcept=0 |
Maps handle to heap memory accessible by any memory manipulation routines. More... | |
virtual void | unlock (void *handle) noexcept=0 |
Unmaps memory by handle with multiple sequential mappings of the same handle. More... | |
virtual void * | alloc (size_t size) noexcept=0 |
Allocates memory. More... | |
virtual bool | free (void *handle) noexcept=0 |
Releases the handle and all associated memory resources which invalidates the handle. More... | |
Protected Member Functions | |
~IAllocator () override=default | |
Disables the ability of deleting the object without release. | |
Allocator concept to be used for memory management and is used as part of the Blob.
|
pure virtualnoexcept |
Allocates memory.
size | The size in bytes to allocate |
|
pure virtualnoexcept |
Releases the handle and all associated memory resources which invalidates the handle.
handle | The handle to free |
false
if handle cannot be released, otherwise - true
.
|
pure virtualnoexcept |
Maps handle to heap memory accessible by any memory manipulation routines.
handle | Handle to the allocated memory to be locked |
op | Operation to lock memory for |
|
pure virtualnoexcept |
Unmaps memory by handle with multiple sequential mappings of the same handle.
The multiple sequential mappings of the same handle are suppose to get the same result while there isn't a ref counter supported.
handle | Handle to the locked memory to unlock |