56#ifndef JUNO_MEMORY_API_H
57#define JUNO_MEMORY_API_H
129 ptAlloc->ptPointerApi
#define JUNO_ASSERT_EXISTS(ptr)
Returns JUNO_STATUS_NULLPTR_ERROR if the expression is falsy.
Definition macros.h:50
#define JUNO_ASSERT_SUCCESS(tStatus,...)
Execute the provided failure operation(s) if status is not success.
Definition macros.h:87
static JUNO_STATUS_T JunoMemory_AllocVerify(const JUNO_MEMORY_ALLOC_ROOT_T *ptAlloc)
Verify a memory allocator instance and its dependent pointer API.
Definition memory_api.h:124
static JUNO_STATUS_T JunoMemory_AllocApiVerify(const JUNO_MEMORY_ALLOC_API_T *ptAllocApi)
Verify that a memory allocator API provides required functions.
Definition memory_api.h:107
static JUNO_STATUS_T JunoMemory_PointerApiVerify(const JUNO_POINTER_API_T *ptPointerApi)
Verify that a pointer API provides required functions.
Definition pointer_api.h:154
#define JUNO_MODULE_ROOT(API_T,...)
Implement a module root struct containing ptApi and failure fields.
Definition module.h:126
#define JUNO_STATUS_SUCCESS
Operation completed successfully.
Definition status.h:56
int32_t JUNO_STATUS_T
Canonical status type for LibJuno functions.
Definition status.h:49
Common assertion and helper macros for LibJuno modules.
struct JUNO_MEMORY_ALLOC_ROOT_TAG JUNO_MEMORY_ALLOC_ROOT_T
Definition memory_api.h:70
Module system and dependency injection primitives for LibJuno.
Pointer trait and helpers for memory operations.
struct JUNO_POINTER_TAG JUNO_POINTER_T
Definition pointer_api.h:49
Status codes and failure-handling helpers for LibJuno.
Vtable for memory allocation operations.
Definition memory_api.h:80
JUNO_STATUS_T(* Put)(JUNO_MEMORY_ALLOC_ROOT_T *ptMem, JUNO_POINTER_T *pvAddr)
Free a previously allocated memory region.
Definition memory_api.h:98
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).
Definition memory_api.h:92
JUNO_RESULT_POINTER_T(* Get)(JUNO_MEMORY_ALLOC_ROOT_T *ptMem, size_t zSize)
Allocate a memory region of at least zSize bytes.
Definition memory_api.h:85
Pointer operations API (copy/reset).
Definition pointer_api.h:74