Malloc for expansion cart 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. | |
|
inlinestatic |
Free allocated memory.
ptr | Pointer to allocated memory |
|
inlinestatic |
Gets total size of the free space in the memory zone.
|
inlinestatic |
Gets report on the allocator state.
|
inlinestatic |
Gets total size of the memory zone.
|
inlinestatic |
Gets total size of the used space in the memory zone.
|
inlinestatic |
Check whether pointer is in range of the memory zone.
ptr | Pointer to check |
|
inlinestatic |
Allocate some memory.
size | Number of bytes to allocate |
|
inlinestatic |
Reallocate existing memory.
ptr | Pointer to the existing allocated memory |
size | New size in number of bytes that should be allocated |