Allocator concept to be used for memory management and is used as part of the Blob.
More...
#include <ie_allocator.hpp>
|
virtual void * |
lock (void *handle, LockOp=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. The multiple sequential mappings of the same handle are suppose to get the same result while there isn't a ref counter supported. More...
|
|
virtual void * |
alloc (size_t size) noexcept=0 |
|
Allocates memory. More...
|
|
virtual bool |
free (void *handle) noexcept=0 |
|
Releases handle and all associated memory resources which invalidates the handle. More...
|
|
|
|
~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.
§ alloc()
virtual void* InferenceEngine::IAllocator::alloc |
( |
size_t |
size |
) |
|
|
pure virtualnoexcept |
Allocates memory.
- Parameters
-
size |
The size in bytes to allocate |
- Returns
- Handle to the allocated resource
§ free()
virtual bool InferenceEngine::IAllocator::free |
( |
void * |
handle |
) |
|
|
pure virtualnoexcept |
Releases handle and all associated memory resources which invalidates the handle.
- Returns
- false if handle cannot be released, otherwise - true.
§ lock()
virtual void* InferenceEngine::IAllocator::lock |
( |
void * |
handle, |
|
|
LockOp |
= LOCK_FOR_WRITE |
|
) |
|
|
|
pure virtualnoexcept |
Maps handle to heap memory accessible by any memory manipulation routines.
- Parameters
-
handle |
Handle to the allocated memory to be locked |
LockOp |
Operation to lock memory for |
- Returns
- Generic pointer to memory
§ unlock()
virtual void InferenceEngine::IAllocator::unlock |
( |
void * |
handle |
) |
|
|
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.
- Parameters
-
handle |
Handle to the locked memory to unlock |
The documentation for this class was generated from the following file: