AWS SDK for C++  1.7.243
AWS SDK for C++
Public Member Functions | List of all members
Aws::Utils::Memory::MemorySystemInterface Class Referenceabstract

#include <MemorySystemInterface.h>

Public Member Functions

virtual ~MemorySystemInterface ()=default
 
virtual void Begin ()=0
 
virtual void End ()=0
 
virtual void * AllocateMemory (std::size_t blockSize, std::size_t alignment, const char *allocationTag=nullptr)=0
 
virtual void FreeMemory (void *memoryPtr)=0
 

Detailed Description

Central interface for memory management customizations. To create a custom memory manager, implement this interface and then call InitializeAWSMemorySystem().

Definition at line 32 of file MemorySystemInterface.h.

Constructor & Destructor Documentation

◆ ~MemorySystemInterface()

virtual Aws::Utils::Memory::MemorySystemInterface::~MemorySystemInterface ( )
virtualdefault

Member Function Documentation

◆ AllocateMemory()

virtual void* Aws::Utils::Memory::MemorySystemInterface::AllocateMemory ( std::size_t  blockSize,
std::size_t  alignment,
const char *  allocationTag = nullptr 
)
pure virtual

Allocate your memory inside this method. blocksize and alignment are exactly the same as the std::alocators interfaces. The allocationTag parameter is for memory tracking; you don't have to handle it.

◆ Begin()

virtual void Aws::Utils::Memory::MemorySystemInterface::Begin ( )
pure virtual

This is for initializing your memory manager in a static context. This can be empty if you don't need to do that.

◆ End()

virtual void Aws::Utils::Memory::MemorySystemInterface::End ( )
pure virtual

This is for cleaning up your memory manager in a static context. This can be empty if you don't need to do that.

◆ FreeMemory()

virtual void Aws::Utils::Memory::MemorySystemInterface::FreeMemory ( void *  memoryPtr)
pure virtual

Free the memory pointed to by memoryPtr.


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