ADTF  3.18.2
memory_allocator_intf.h
Go to the documentation of this file.
1 
7 #pragma once
8 #include <adtfucom3/adtf_ucom3.h>
9 
11 #define CID_ADTF_MEMORY_ALLOCATOR "memory_allocator.service.adtf.cid"
12 
13 namespace adtf
14 {
15 namespace services
16 {
17 namespace ant
18 {
19 
24 {
25  public:
30  ADTF_IID(IMemoryAllocator, "memory_allocator.ant.services.adtf.iid");
31 
32  public:
40  virtual tResult Alloc(size_t nBytes, void*& pMemory, size_t& nCapacity) = 0;
41 
47  virtual tResult Free(void* pMemory) = 0;
48 };
49 
50 }
51 
53 
54 }
55 
56 }
Copyright © Audi Electronics Venture GmbH.
Interface for allocation and releasing of memory.
ADTF_IID(IMemoryAllocator, "memory_allocator.ant.services.adtf.iid")
Marks the IMemoryAllocator to be castable with the adtf::ucom::ant::ucom_cast<>
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.
virtual tResult Free(void *pMemory)=0
Releases a block of memory that has been allocated with Alloc.
Base class for every interface type within the uCOM.
Definition: object_intf.h:31
Namespace for entire ADTF SDK.