LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
JUNO_MEMORY_ALLOC_API_TAG Struct Reference

Vtable for memory allocation operations. More...

#include <memory_api.h>

Data Fields

JUNO_RESULT_POINTER_T(* Get )(JUNO_MEMORY_ALLOC_ROOT_T *ptMem, size_t zSize)
 Allocate a memory region of at least zSize bytes.
 
JUNO_STATUS_T(* Update )(JUNO_MEMORY_ALLOC_ROOT_T *ptMem, JUNO_POINTER_T *ptMemory, size_t zNewSize)
 Update an existing allocation to a new size (in-place descriptor update).
 
JUNO_STATUS_T(* Put )(JUNO_MEMORY_ALLOC_ROOT_T *ptMem, JUNO_POINTER_T *pvAddr)
 Free a previously allocated memory region.
 

Detailed Description

Vtable for memory allocation operations.

Field Documentation

◆ Get

JUNO_RESULT_POINTER_T(* JUNO_MEMORY_ALLOC_API_TAG::Get) (JUNO_MEMORY_ALLOC_ROOT_T *ptMem, size_t zSize)

Allocate a memory region of at least zSize bytes.

Parameters
ptMemAllocator root object.
zSizeSize in bytes to allocate.
Returns
Result containing a JUNO_POINTER_T on success.

◆ Put

JUNO_STATUS_T(* JUNO_MEMORY_ALLOC_API_TAG::Put) (JUNO_MEMORY_ALLOC_ROOT_T *ptMem, JUNO_POINTER_T *pvAddr)

Free a previously allocated memory region.

Parameters
ptMemAllocator root object.
pvAddrPointer descriptor to free.
Returns
JUNO_STATUS_SUCCESS on success, error code otherwise.

◆ Update

JUNO_STATUS_T(* JUNO_MEMORY_ALLOC_API_TAG::Update) (JUNO_MEMORY_ALLOC_ROOT_T *ptMem, JUNO_POINTER_T *ptMemory, size_t zNewSize)

Update an existing allocation to a new size (in-place descriptor update).

Parameters
ptMemAllocator root object.
ptMemoryPointer descriptor to update (in/out).
zNewSizeThe new size in bytes.
Returns
JUNO_STATUS_SUCCESS on success, error code otherwise.

The documentation for this struct was generated from the following file: