59 static const char*
const tag =
"ra8_xz_pool";
64 const uintptr_t base_address = (uintptr_t)base;
93 if (size > (UINT32_MAX - (align - 1U))) {
96 const uint32_t need = (size + (align - 1U)) & ~(align - 1U);
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_CHECK_NULL_PTR(ptr, tag, message)
Reject nullptr pointer, returning k_ra8_err_null_ptr.
@ k_ra8_err_busy
Resource busy – blocking operation cannot proceed.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
@ k_ra8_err_invalid_size
Invalid size parameter (too large, too small, or misaligned).
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
void unarch_xz_pool_reset(void)
Release the installed arena (invalidates every pool allocation).
uint32_t unarch_xz_pool_used(void)
Bytes currently bump-allocated from the installed arena.
static uint32_t s_pool_len
Length of the installed arena in bytes (0 when uninstalled).
static uint8_t * s_pool_base
Start of the installed arena (NULL when uninstalled).
void * unarch_xz_pool_alloc(uint32_t size)
Bump-allocate size bytes from the installed arena.
static uint32_t s_pool_off
Bump cursor: bytes consumed from the installed arena.
ra8_err_t unarch_xz_pool_install(void *base, uint32_t len)
Install a caller-owned scratch buffer as the XZ allocation arena.
Caller-owned bump arena backing xz-embedded's allocator seam.
@ k_unarch_xz_pool_align
Bump-allocation alignment, bytes.