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

Bookkeeping written immediately below every allocated payload. More...

Data Fields

void * base
 Exact pointer tx_byte_allocate returned.
uint32_t magic
 k_ra8_esp_hosted_hdr_magic while live.
uint32_t size
 Payload bytes the caller asked for.

Detailed Description

Bookkeeping written immediately below every allocated payload.

Carries what ThreadX byte pools do not: the exact pointer tx_byte_allocate returned, the payload size _h_realloc must preserve, and a sentinel that rejects a foreign pointer.

Invariant
magic equals k_ra8_esp_hosted_hdr_magic in a live block.
base is the pointer ThreadX must be handed back.
Example:
(void)memcpy(&hdr, (const uint8_t*)p - k_ra8_esp_hosted_hdr_bytes, sizeof(hdr));
@ k_ra8_esp_hosted_hdr_bytes
Per-block header footprint.
void * memcpy(void *dst, const void *src, size_t n)
Copy memory area between non-overlapping regions.
Bookkeeping written immediately below every allocated payload.
See also
priv_ra8_esp_hosted_rtos_alloc
Since
0.1.0

Definition at line 112 of file ra8_esp_hosted_rtos_pool.c.

Field Documentation

◆ base

void* ra8_esp_hosted_alloc_hdr_t::base

Exact pointer tx_byte_allocate returned.

Definition at line 113 of file ra8_esp_hosted_rtos_pool.c.

Referenced by priv_ra8_esp_hosted_rtos_alloc(), and priv_ra8_esp_hosted_rtos_release().

◆ magic

uint32_t ra8_esp_hosted_alloc_hdr_t::magic

◆ size

uint32_t ra8_esp_hosted_alloc_hdr_t::size

Payload bytes the caller asked for.

Definition at line 115 of file ra8_esp_hosted_rtos_pool.c.

Referenced by priv_ra8_esp_hosted_rtos_alloc(), and priv_ra8_esp_hosted_rtos_block_size().


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