60typedef enum : uint32_t {
70 if ((link ==
nullptr) || (link->
arena ==
nullptr)) {
79 if (size > (
size_t)avail) {
82 const uint32_t want = (uint32_t)size;
84 if (pad > (avail - want)) {
91 return &link->
arena[at];
97 if ((link ==
nullptr) || (pointer ==
nullptr) || (link->
arena_last == 0U)) {
101 if (pointer == &link->
arena[at]) {
109 if (link ==
nullptr) {
118 if ((out ==
nullptr) || (link ==
nullptr)) {
123 out->allocator_data = link;
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
The single integration boundary between this firmware and the ESP32-C6.
struct ra8_c6link ra8_c6link_t
void priv_c6link_arena_free(void *ctx, void *pointer)
Return a block to the link's decode arena.
ra8_c6link_arena_t
Alignment the arena hands out blocks at.
@ k_ra8_c6link_arena_align
Alignment, in bytes, of every block the arena hands out.
@ k_ra8_c6link_arena_mask
k_ra8_c6link_arena_align minus one, as a rounding mask.
void priv_c6link_arena_bind(ProtobufCAllocator *out, ra8_c6link_t *link)
Bind an allocator descriptor to a link's arena.
void * priv_c6link_arena_alloc(void *ctx, size_t size)
Take a block from the link's decode arena.
void priv_c6link_arena_reset(ra8_c6link_t *link)
Empty the link's decode arena.
Cross-translation-unit contract inside libs/ra8_c6link.
uint32_t arena_used
Bump offset into arena.
uint32_t arena_bytes
Bytes available at arena.
uint32_t arena_last
Newest live block's offset plus one, or zero when there is none.
uint8_t * arena
Protobuf decode arena.