ADTF
Loading...
Searching...
No Matches
adtf::services::IMemoryAllocator Class Referenceabstract

#include <memory_allocator_intf.h>

Inherits adtf::ucom::ant::IObject.

Public Member Functions

 ADTF_IID (IMemoryAllocator, "memory_allocator.ant.services.adtf.iid")
 
virtual tResult Alloc (size_t nBytes, void *&pMemory, size_t &nCapacity)=0
 
virtual tResult Free (void *pMemory)=0
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

Interface for allocation and releasing of memory.

Member Function Documentation

◆ ADTF_IID()

adtf::services::ant::IMemoryAllocator::ADTF_IID ( IMemoryAllocator ,
"memory_allocator.ant.services.adtf.iid"  )

◆ Alloc()

virtual tResult adtf::services::ant::IMemoryAllocator::Alloc ( size_t nBytes,
void *& pMemory,
size_t & nCapacity )
pure virtual

Allocates a contigeous block of memory which is at least of size nBytes.

Parameters
[in]nBytesThe amount of bytes that should be allocated.
[out]pMemoryThis will point to the allocated memory.
[out]nCapacityThe actual size of the block.
Returns
standard result.

◆ Free()

virtual tResult adtf::services::ant::IMemoryAllocator::Free ( void * pMemory)
pure virtual

Releases a block of memory that has been allocated with Alloc.

Parameters
[in]pMemoryThe pointer to the memory.
Returns
standard result

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