SaturnRingLibrary 0.6
SGL wrapper
 
Loading...
Searching...
No Matches
SRL::Memory::HighWorkRam Class Reference

Detailed Description

Malloc for main system RAM.

#include <srl_memory.hpp>

Static Public Member Functions

static void Free (void *ptr)
 Free allocated memory.
 
static size_t GetFreeSpace ()
 Gets total size of the free space in the memory zone.
 
static const Report GetReport ()
 Gets report on the allocator state.
 
static size_t GetSize ()
 Gets total size of the memory zone.
 
static size_t GetUsedSpace ()
 Gets total size of the used space in the memory zone.
 
static bool InRange (void *ptr)
 Check whether pointer is in range of the memory zone.
 
static void * Malloc (size_t size)
 Allocate some memory.
 
static void * Realloc (void *ptr, size_t size)
 Reallocate existing memory.
 

Member Function Documentation

◆ Free()

static void SRL::Memory::HighWorkRam::Free ( void * ptr)
inlinestatic

Free allocated memory.

Parameters
ptrPointer to allocated memory

◆ GetFreeSpace()

static size_t SRL::Memory::HighWorkRam::GetFreeSpace ( )
inlinestatic

Gets total size of the free space in the memory zone.

Returns
Number of bytes

◆ GetReport()

static const Report SRL::Memory::HighWorkRam::GetReport ( )
inlinestatic

Gets report on the allocator state.

Returns
Current state of the allocator

◆ GetSize()

static size_t SRL::Memory::HighWorkRam::GetSize ( )
inlinestatic

Gets total size of the memory zone.

Returns
Number of bytes

◆ GetUsedSpace()

static size_t SRL::Memory::HighWorkRam::GetUsedSpace ( )
inlinestatic

Gets total size of the used space in the memory zone.

Returns
Number of bytes

◆ InRange()

static bool SRL::Memory::HighWorkRam::InRange ( void * ptr)
inlinestatic

Check whether pointer is in range of the memory zone.

Parameters
ptrPointer to check
Returns
true if pointer belongs to the current memory zone

◆ Malloc()

static void * SRL::Memory::HighWorkRam::Malloc ( size_t size)
inlinestatic

Allocate some memory.

Parameters
sizeNumber of bytes to allocate
Returns
Pointer to the allocated space in memory

◆ Realloc()

static void * SRL::Memory::HighWorkRam::Realloc ( void * ptr,
size_t size )
inlinestatic

Reallocate existing memory.

Parameters
ptrPointer to the existing allocated memory
sizeNew size in number of bytes that should be allocated
Returns
Pointer to the allocated space in memory