27#ifndef JUNO_MEMORY_API_H
28#define JUNO_MEMORY_API_H
40#define JUNO_MEMORY_BLOCK(name, type, length) static type name[length] = {}
45#define JUNO_MEMORY_BLOCK_METADATA(name, length) static JUNO_MEMORY_BLOCK_METADATA_T name[length] = {}
48#define JUNO_REF(name) REF##name
50#define JUNO_NEW_REF(name) JUNO_MEMORY_T *JUNO_REF(name)
struct JUNO_MEMORY_BLOCK_TAG JUNO_MEMORY_BLOCK_T
Definition memory_api.h:53
#define JUNO_MODULE_BASE(name, API, members)
Definition module.h:81
#define JUNO_MODULE_EMPTY
Definition module.h:50
#define JUNO_MODULE_BASE_DECLARE(name)
Definition module.h:31
#define JUNO_MODULE_DECLARE(name)
Definition module.h:26
enum JUNO_STATUS_TAG JUNO_STATUS_T
Definition memory_api.h:82
JUNO_STATUS_T(* Update)(JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *ptMemory, size_t zNewSize)
Updates an existing memory allocation to a new size.
Definition memory_api.h:97
JUNO_STATUS_T(* Get)(JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *pvRetAddr, size_t zSize)
Allocates memory using the specified memory allocation method.
Definition memory_api.h:89
JUNO_STATUS_T(* Put)(JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *pvAddr)
Frees an allocated memory block.
Definition memory_api.h:104
Structure for an allocated memory segment. Describes the allocated memory with a pointer to the start...
Definition memory_api.h:65
void * pvAddr
Pointer to the allocated memory.
Definition memory_api.h:67
size_t iRefCount
The reference count for this memory.
Definition memory_api.h:71
size_t zSize
Size of the allocated memory, in bytes.
Definition memory_api.h:69