Version1 of the interface that represents an interface to be implemented by client in case he is interested in controlling the memory allocation and deallocation on the heap.
More...
#include <IMemoryAllocator.h>
Version1 of the interface that represents an interface to be implemented by client in case he is interested in controlling the memory allocation and deallocation on the heap.
In case client is interested in controlling the memory allocation and deallocation on the heap he can implement this interface and register the same with the #AdobeXMPCommon::IConfigurationManager. For every request of memory allocation or deallocation on the heap corresponding function will be called by the library.
- Attention
- Support for Multi threading is under clients hand.
Definition at line 29 of file IMemoryAllocator.h.
◆ ~IMemoryAllocator_v1()
virtual AdobeXMPCommon::IMemoryAllocator_v1::~IMemoryAllocator_v1 |
( |
| ) |
|
|
inlinevirtual |
◆ allocate()
virtual void* APICALL AdobeXMPCommon::IMemoryAllocator_v1::allocate |
( |
sizet |
size | ) |
|
|
pure virtual |
Called by the library whenever it needs some space on the heap.
- Parameters
-
[in] | size | A value of type #AdobeXMPCommon::sizet indicating the number of bytes required by the library on the heap. |
- Returns
- A pointer to memory location on the heap.
◆ deallocate()
virtual void APICALL AdobeXMPCommon::IMemoryAllocator_v1::deallocate |
( |
void * |
ptr | ) |
|
|
pure virtual |
Called by the library whenever there is no further need for a previously allocated space on the heap.
- Parameters
-
[in] | ptr | A pointer to a memory location which is no longer needed. |
◆ reallocate()
virtual void* APICALL AdobeXMPCommon::IMemoryAllocator_v1::reallocate |
( |
void * |
ptr, |
|
|
sizet |
size |
|
) |
| |
|
pure virtual |
Called by the library whenever it needs to expand or contract some space already allocated on the heap, preserving the contents.
- Parameters
-
[in] | ptr | A pointer to a memory location which was previously allocated on the heap. |
[in] | size | A value of type #AdobeXMPCommon::sizet indicating the new number of bytes required by the library on the heap. |
- Returns
- A pointer to memory location on the heap which is of new size and previous contents are preserved.
◆ REQ_FRIEND_CLASS_DECLARATION()
AdobeXMPCommon::IMemoryAllocator_v1::REQ_FRIEND_CLASS_DECLARATION |
( |
| ) |
|
|
protected |
The documentation for this class was generated from the following file: