ADTF  3.14.3
IMemoryAllocatorabstract

Interface for allocation and releasing of memory. More...

Inheritance diagram for IMemoryAllocator:
[legend]

Public Member Functions

 ADTF_IID (IMemoryAllocator, "memory_allocator.ant.services.adtf.iid")
 Marks the IMemoryAllocator to be castable with the adtf::ucom::ant::ucom_cast<> More...
 
virtual tResult Alloc (size_t nBytes, void *&pMemory, size_t &nCapacity)=0
 Allocates a contigeous block of memory which is at least of size nBytes. More...
 
virtual tResult Free (void *pMemory)=0
 Releases a block of memory that has been allocated with Alloc. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Additional Inherited Members

- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

Detailed Description

Interface for allocation and releasing of memory.

Definition at line 23 of file memory_allocator_intf.h.

Member Function Documentation

◆ ADTF_IID()

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

◆ Alloc()

virtual tResult 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 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

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)