LibJuno 0.1.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
|
API for generic memory allocation operations. More...
#include <memory_api.h>
Data Fields | |
JUNO_STATUS_T(* | Get )(JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *pvRetAddr, size_t zSize) |
Allocates memory using the specified memory allocation method. | |
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. | |
JUNO_STATUS_T(* | Put )(JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *pvAddr) |
Frees an allocated memory block. | |
API for generic memory allocation operations.
This structure holds pointers to functions that implement operations for generic memory allocation including allocation, update, and free.
JUNO_STATUS_T(* JUNO_MEMORY_API_TAG::Get) (JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *pvRetAddr, size_t zSize) |
Allocates memory using the specified memory allocation method.
ptMem | Pointer to the memory allocation structure. |
pvRetAddr | Pointer to a memory descriptor where allocation details will be stored. |
zSize | Size of the memory block to allocate in bytes. |
JUNO_STATUS_T(* JUNO_MEMORY_API_TAG::Put) (JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *pvAddr) |
Frees an allocated memory block.
ptMem | Pointer to the memory allocation structure. |
pvAddr | Pointer to the memory block to free. |
JUNO_STATUS_T(* JUNO_MEMORY_API_TAG::Update) (JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *ptMemory, size_t zNewSize) |
Updates an existing memory allocation to a new size.
ptMem | Pointer to the memory allocation structure. |
ptMemory | Pointer to the memory descriptor to update. |
zNewSize | The new size for the memory block. |