#include <osxheap.h>
OSX implementation of Memory::Heap.
The OSX implementation uses a memory zone.
(C) 2010 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file
|
| OSXHeap (const char *name, size_t initialSize=64 *1024) |
| constructor (name must be a static string!)
|
|
| ~OSXHeap () |
| destructor
|
|
const char * | GetName () const |
| get heap name
|
|
void * | Alloc (size_t size, size_t alignment=16) |
| 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
|
|
|
static void | Setup () |
| static setup method (called by Core::SysFunc::Setup)
|
|
|
| OSXHeap () |
| default constructor not allowed
|
|
◆ OSXHeap() [1/2]
OSX::OSXHeap::OSXHeap |
( |
const char * | name, |
|
|
size_t | initialSize = 64 * 1024 ) |
constructor (name must be a static string!)
◆ ~OSXHeap()
OSX::OSXHeap::~OSXHeap |
( |
| ) |
|
◆ OSXHeap() [2/2]
OSX::OSXHeap::OSXHeap |
( |
| ) |
|
|
private |
default constructor not allowed
◆ Alloc()
void * OSX::OSXHeap::Alloc |
( |
size_t | size, |
|
|
size_t | alignment = 16 ) |
allocate a block of memory from the heap
◆ Free()
void OSX::OSXHeap::Free |
( |
void * | ptr | ) |
|
◆ GetName()
const char * OSX::OSXHeap::GetName |
( |
| ) |
const |
|
inline |
◆ Realloc()
void * OSX::OSXHeap::Realloc |
( |
void * | ptr, |
|
|
size_t | newSize ) |
re-allocate a block of memory
◆ Setup()
void OSX::OSXHeap::Setup |
( |
| ) |
|
|
static |
static setup method (called by Core::SysFunc::Setup)
This method must be called at the beginning of the application before any threads are spawned.
◆ heapZone
malloc_zone_t* OSX::OSXHeap::heapZone |
|
private |
◆ name
const char* OSX::OSXHeap::name |
|
private |
The documentation for this class was generated from the following files:
- /github/workspace/code/foundation/memory/osx/osxheap.h
- /github/workspace/code/foundation/memory/osx/osxheap.cc