38 return lifecycle_status;
50 if ((storage == NULL) || (config == NULL) || (out_handle == NULL))
64 return lifecycle_status;
79 if ((handle == NULL) || (out_block == NULL))
97 if ((handle == NULL) || (block == NULL))
113 size_t *out_free_blocks,
114 size_t *out_used_blocks)
116 if ((handle == NULL) || (out_free_blocks == NULL) || (out_used_blocks == NULL))
120 *out_free_blocks = 0U;
121 *out_used_blocks = 0U;
130 return s_backend->
stats(handle, out_free_blocks, out_used_blocks);
sapi_status_t sapi_lifecycle_check_setup_allowed(void)
Convenience check for a setup-only constructor: call this as one of the first checks in any function ...
sapi_status_t sapi_mem_pool_register_backend(const sapi_mem_pool_backend_t *backend)
Registers the backend implementation used by every sapi_mem_pool_* call (ADR-005 section 2....
sapi_status_t sapi_mem_pool_acquire(sapi_mem_pool_handle_t handle, void **out_block)
Acquires one fixed-size block from the pool.
sapi_status_t sapi_mem_pool_create(sapi_mem_pool_storage_t *storage, const sapi_mem_pool_config_t *config, sapi_mem_pool_handle_t *out_handle)
Reserves a fixed-size-block memory pool.
struct sapi_mem_pool_impl_s * sapi_mem_pool_handle_t
Opaque handle to a reserved pool, returned by sapi_mem_pool_create().
sapi_status_t sapi_mem_pool_release(sapi_mem_pool_handle_t handle, void *block)
Returns a previously acquired block to its pool.
sapi_status_t sapi_mem_pool_stats(sapi_mem_pool_handle_t handle, size_t *out_free_blocks, size_t *out_used_blocks)
Reports current free/used block counts for diagnostics.
sapi_status_t
Common result/status codes.
@ SAPI_STATUS_NOT_SUPPORTED
@ SAPI_STATUS_INVALID_PARAM
@ SAPI_STATUS_NOT_INITIALIZED
static const sapi_clocksync_backend_t * s_backend
Process-wide application setup-phase lock (ADR-026).
OS Abstraction Layer - Static memory reservation service.
OS-backend adaptation surface for the static memory pool service (ADR-005, ADR-021).
Backend vtable: an integrator's implementation of the memory pool service (ADR-005)....
sapi_status_t(*) acquire(sapi_mem_pool_handle_t handle, void **out_block)
Backend implementation of sapi_mem_pool_acquire(). May be NULL.
sapi_status_t(*) create(sapi_mem_pool_storage_t *storage, const sapi_mem_pool_config_t *config, sapi_mem_pool_handle_t *out_handle)
Backend implementation of sapi_mem_pool_create(). May be NULL.
sapi_status_t(*) stats(sapi_mem_pool_handle_t handle, size_t *out_free_blocks, size_t *out_used_blocks)
Backend implementation of sapi_mem_pool_stats(). May be NULL.
sapi_status_t(*) release(sapi_mem_pool_handle_t handle, void *block)
Backend implementation of sapi_mem_pool_release(). May be NULL.
Configuration for sapi_mem_pool_create().