Dynamic memory management.
#include <srl_memory.hpp>
Classes | |
class | CartRam |
Malloc for expansion cart RAM. More... | |
class | HighWorkRam |
Malloc for main system RAM. More... | |
class | LowWorkRam |
Malloc for slower system RAM. More... | |
struct | Report |
Contains report of the state. More... | |
Public Types | |
enum | Zone { HWRam = 0 , LWRam = 1 , CartRam = 2 } |
Memory zone codes. More... | |
Static Public Member Functions | |
static void | Free (void *ptr) |
Free allocated memory from any memory zone. | |
static size_t | GetFreeSpace (const Zone zone) |
Gets total size of the free space in the memory zone. | |
static size_t | GetSize (const Zone zone) |
Gets total size of the memory zone. | |
static size_t | GetUsedSpace (const Zone zone) |
Gets total size of the used space in the memory zone. | |
static void | Initialize () |
Initialize memory. | |
static void | MemSet (void *destination, const uint8_t value, const size_t length) |
Det memory to some value. | |
enum SRL::Memory::Zone |
Memory zone codes.
Enumerator | |
---|---|
HWRam | High (main) system RAM. |
LWRam | Low system RAM. |
CartRam | Expansion cart RAM. |
|
inlinestatic |
Free allocated memory from any memory zone.
ptr | Pointer to allocated memory |
|
inlinestatic |
Gets total size of the free space in the memory zone.
zone | Memory zone |
|
inlinestatic |
|
inlinestatic |
Gets total size of the used space in the memory zone.
zone | Memory zone |
|
inlinestatic |
Det memory to some value.
destination | Destination to set |
value | Value to set |
length | Data length to set |