Nebula
Loading...
Searching...
No Matches
Posix::PosixHeap Class Reference

#include <posixheap.h>

Detailed Description

Posix implementation of the class Memory::Heap using the Posix-Heap functions.

Generally switches on the Low-Fragmentation-Heap, since this seems generally suitable for most C++ applications.

(C) 2006 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file

Public Member Functions

 PosixHeap (const char *name)
 constructor (name must be static string!)
 
 ~PosixHeap ()
 destructor
 
const char * GetName () const
 get heap name
 
void * Alloc (size_t size)
 allocate a block of memory from the heap
 
void * Realloc (void *ptr, size_t newSize)
 re-allocate a block of memory
 
void Free (void *ptr)
 free a block of memory which has been allocated from this heap
 

Static Public Member Functions

static void Setup ()
 static setup method (called by Util::Setup)
 

Private Member Functions

 PosixHeap ()
 default constructor not allowed
 

Private Attributes

const char * name
 

Constructor & Destructor Documentation

◆ PosixHeap() [1/2]

Posix::PosixHeap::PosixHeap ( const char * name)

constructor (name must be static string!)

◆ ~PosixHeap()

Posix::PosixHeap::~PosixHeap ( )

destructor

◆ PosixHeap() [2/2]

Posix::PosixHeap::PosixHeap ( )
private

default constructor not allowed

Member Function Documentation

◆ Alloc()

__forceinline void * Posix::PosixHeap::Alloc ( size_t size)

allocate a block of memory from the heap

◆ Free()

__forceinline void Posix::PosixHeap::Free ( void * ptr)

free a block of memory which has been allocated from this heap

◆ GetName()

const char * Posix::PosixHeap::GetName ( ) const
inline

get heap name

◆ Realloc()

__forceinline void * Posix::PosixHeap::Realloc ( void * ptr,
size_t newSize )

re-allocate a block of memory

◆ Setup()

void Posix::PosixHeap::Setup ( )
static

static setup method (called by Util::Setup)

This method must be called at the beginning of the application because any threads are spawned (usually called by Util::Setup().

Member Data Documentation

◆ name

const char* Posix::PosixHeap::name
private

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