|
Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
Buffer is a lightweight VIEW over caller-owned storage. No allocation, no freeing - just state tracking: data pointer, capacity, current length.
buf.data != NULL - Pointing to valid storage buf.capacity > 0 - Has space buf.length <= buf.capacity - Never overfilled
Caller owns backing storage:
Buffer manages:
| Operation | Time |
|---|---|
| init() | O(1) |
| set_length() | O(1) |
| clear() | O(1) |
No copying, no allocation.