ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_mdl_decode_arena Struct Reference

Linear allocator storage the generated decoder draws one dispatch from. More...

#include <ra8_c6link_mdl_msg.h>

Data Fields

uint8_t bytes [k_ra8_mdl_decode_arena_bytes]
 Fixed protobuf decode storage.
size_t used
 Bytes already allocated.

Detailed Description

Linear allocator storage the generated decoder draws one dispatch from.

A bump allocator with no free list: ra8_mdl_service_dispatch clears the whole object before it decodes, so every dispatch starts from an empty arena and nothing survives the call that produced it. It lives in ra8_mdl_service rather than on the dispatch stack because a two-kilobyte automatic object put ra8_mdl_service_dispatch over the 2048-byte first-party frame budget on the Cortex-M85 (-fstack-usage); the service is caller-owned and single-job, so the move changes no ownership or reentrancy property.

Invariant
used never exceeds sizeof(bytes).
Every live decoded pointer refers into bytes.
ra8_mdl_service_t service = {};
See also
ra8_mdl_service_dispatch
Since
0.1.0

Definition at line 116 of file ra8_c6link_mdl_msg.h.

Field Documentation

◆ bytes

uint8_t ra8_mdl_decode_arena::bytes[k_ra8_mdl_decode_arena_bytes]

Fixed protobuf decode storage.

The allocator rounds every span it issues up to k_ra8_mdl_decode_align, which only yields aligned spans if the base is aligned too – decoded messages carry 64-bit fields.

Definition at line 117 of file ra8_c6link_mdl_msg.h.

Referenced by internal_mdl_decode_alloc().

◆ used

size_t ra8_mdl_decode_arena::used

Bytes already allocated.

Definition at line 121 of file ra8_c6link_mdl_msg.h.

Referenced by internal_mdl_decode_alloc().


The documentation for this struct was generated from the following file: