|
Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
A bounds-checked, canary-protected wrapper around one raw memory region. Opaque to callers in spirit (every field is manipulated only through the functions below) but a plain struct, not a handle, so it can be embedded directly in a caller's own statically-allocated storage - no dynamic allocation, matching CLAUDE.md. More...
#include <sapi_safe_ptr.h>
Data Fields | |
| void * | ptr |
| size_t | size |
| uint32_t | canary |
A bounds-checked, canary-protected wrapper around one raw memory region. Opaque to callers in spirit (every field is manipulated only through the functions below) but a plain struct, not a handle, so it can be embedded directly in a caller's own statically-allocated storage - no dynamic allocation, matching CLAUDE.md.
Definition at line 54 of file sapi_safe_ptr.h.
| void* sapi_safe_ptr_t::ptr |
Wrapped pointer; NULL once invalidated.
Definition at line 56 of file sapi_safe_ptr.h.
| size_t sapi_safe_ptr_t::size |
Size in bytes of the region ptr points to.
Definition at line 57 of file sapi_safe_ptr.h.
| uint32_t sapi_safe_ptr_t::canary |
Corruption check, written by init, cleared by invalidate.
Definition at line 58 of file sapi_safe_ptr.h.