|
Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
Memory pool service: validates parameters, then dispatches to the backend registered via sapi_mem_pool_register_backend() (ADR-005). More...
#include "safeapi/oal/memory/sapi_memory.h"#include "safeapi/utils/lifecycle/sapi_lifecycle.h"#include "safeapi_backend/memory/sapi_memory_backend.h"Go to the source code of this file.
Functions | |
| 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.1). Call once at startup. | |
| 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. | |
| 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_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. | |
Variables | |
| static const sapi_mem_pool_backend_t * | s_backend = NULL |
| Currently registered backend, or NULL if none (ADR-005). | |
Memory pool service: validates parameters, then dispatches to the backend registered via sapi_mem_pool_register_backend() (ADR-005).
Definition in file sapi_memory.c.
|
static |
Currently registered backend, or NULL if none (ADR-005).
Local makros Local types declarations Local variables declarations
Definition at line 17 of file sapi_memory.c.