27#ifndef JUNO_MEMORY_API_H
28#define JUNO_MEMORY_API_H
37#define JUNO_REF(name) REF##name
39#define JUNO_NEW_REF(name) JUNO_MEMORY_T *JUNO_REF(name)
union JUNO_MEMORY_ALLOC_TAG JUNO_MEMORY_ALLOC_T
Definition memory_api.h:63
static JUNO_MEMORY_T * Juno_MemoryGetRef(JUNO_MEMORY_T *ptMemory)
Definition memory_api.h:102
static void Juno_MemoryPutRef(JUNO_MEMORY_T *ptMemory)
Definition memory_api.h:118
struct JUNO_MEMORY_ALLOC_ROOT_TAG JUNO_MEMORY_ALLOC_ROOT_T
Definition memory_api.h:64
#define JUNO_MODULE_EMPTY
Definition module.h:126
#define JUNO_MODULE_ROOT(API_T,...)
Definition module.h:182
enum JUNO_STATUS_TAG JUNO_STATUS_T
Definition memory_api.h:69
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:84
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:76
JUNO_STATUS_T(* Put)(JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *pvAddr)
Frees an allocated memory block.
Definition memory_api.h:91
Structure for an allocated memory segment. Describes the allocated memory with a pointer to the start...
Definition memory_api.h:52
void * pvAddr
Pointer to the allocated memory.
Definition memory_api.h:54
size_t iRefCount
The reference count for this memory.
Definition memory_api.h:58
size_t zSize
Size of the allocated memory, in bytes.
Definition memory_api.h:56