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

Caller-owned state for one fixed-cell pool. More...

#include <ra8_slab.h>

Data Fields

uint8_t * base
 First byte of the cell array (caller buffer).
uint32_t cell_bytes
 Bytes per cell (>= 4, multiple of 4).
uint32_t cell_count
 Total cells the buffer was divided into.
uint32_t free_head
 Index of the first free cell, or k_ra8_slab_nil.
uint32_t free_count
 Cells currently free (observability).

Detailed Description

Caller-owned state for one fixed-cell pool.

Zero-initialise and pass to ra8_slab_init. The backing buffer must out-live the slab. Treat the fields as private.

Invariant
free_count <= cell_count.
free_head is either k_ra8_slab_nil or a valid cell index.
Since
0.1.0

Definition at line 75 of file ra8_slab.h.

Field Documentation

◆ base

uint8_t* ra8_slab_t::base

First byte of the cell array (caller buffer).

Definition at line 76 of file ra8_slab.h.

Referenced by internal_slab_next(), internal_slab_set_next(), ra8_slab_alloc(), ra8_slab_free(), ra8_slab_init(), and ra8_slab_stats().

◆ cell_bytes

uint32_t ra8_slab_t::cell_bytes

Bytes per cell (>= 4, multiple of 4).

Definition at line 77 of file ra8_slab.h.

Referenced by internal_slab_next(), internal_slab_set_next(), ra8_slab_alloc(), ra8_slab_free(), and ra8_slab_init().

◆ cell_count

uint32_t ra8_slab_t::cell_count

Total cells the buffer was divided into.

Definition at line 78 of file ra8_slab.h.

Referenced by ra8_slab_free(), ra8_slab_init(), and ra8_slab_stats().

◆ free_count

uint32_t ra8_slab_t::free_count

Cells currently free (observability).

Definition at line 80 of file ra8_slab.h.

Referenced by ra8_slab_alloc(), ra8_slab_free(), ra8_slab_init(), and ra8_slab_stats().

◆ free_head

uint32_t ra8_slab_t::free_head

Index of the first free cell, or k_ra8_slab_nil.

Definition at line 79 of file ra8_slab.h.

Referenced by ra8_slab_alloc(), ra8_slab_free(), and ra8_slab_init().


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