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 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...
|
|
|
| ~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 the handle and all associated memory resources which invalidates the handle.
- Parameters
-
- Returns
false
if handle cannot be released, otherwise - true
.
§ lock()
virtual void* InferenceEngine::IAllocator::lock |
( |
void * |
handle, |
|
|
LockOp |
op = 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 |
op | 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 interface was generated from the following file: