Public Member Functions | Protected Member Functions
InferenceEngine::IAllocator Class Referenceabstract

Allocator concept to be used for memory management and is used as part of the Blob. More...

#include <ie_allocator.hpp>

Inheritance diagram for InferenceEngine::IAllocator:
Inheritance graph
[legend]
Collaboration diagram for InferenceEngine::IAllocator:
Collaboration graph
[legend]

Public Member Functions

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...
 

Protected Member Functions

 ~IAllocator () override=default
 Disables the ability of deleting the object without release.
 

Detailed Description

Allocator concept to be used for memory management and is used as part of the Blob.

Member Function Documentation

§ alloc()

virtual void* InferenceEngine::IAllocator::alloc ( size_t  size)
pure virtualnoexcept

Allocates memory.

Parameters
sizeThe 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
handleHandle to the allocated memory to be locked
LockOpOperation 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
handleHandle to the locked memory to unlock

The documentation for this class was generated from the following file: