|
Nebula
|
#include <posixheap.h>
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 |
| Posix::PosixHeap::PosixHeap | ( | const char * | name | ) |
constructor (name must be static string!)
| Posix::PosixHeap::~PosixHeap | ( | ) |
destructor
|
private |
default constructor not allowed
| __forceinline void * Posix::PosixHeap::Alloc | ( | size_t | size | ) |
allocate a block of memory from the heap
| __forceinline void Posix::PosixHeap::Free | ( | void * | ptr | ) |
free a block of memory which has been allocated from this heap
|
inline |
get heap name
| __forceinline void * Posix::PosixHeap::Realloc | ( | void * | ptr, |
| size_t | newSize ) |
re-allocate a block of memory
|
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().
|
private |