ssm  0.0.2
Runtime Library for the Sparse Synchronous Model
block Union Reference

(The beginning of) a block of memory. More...

+ Collaboration diagram for block:

Data Fields

union blockfree_list_next
 Pointer to the next block. More...
 
uint8_t block_buf [1]
 Variable-size buffer of the block. More...
 

Detailed Description

(The beginning of) a block of memory.

The size of each block varies depending on which memory pool it resides in. When a block is being used (allocated), block_buf effectively gives a pointer to the beginning that block that can be indexed into.

When a block is not being used, it is maintained in a free list. If it is not at the head of the free list, then it is pointed to by the free_list_next field of some other block_t, while its own free_list_next points to the next block in the free list. To avoid initializing the free_list_next fields of "fresh" blocks, when free_list_next is UNINITIALIZED_FREE_BLOCK, the next free block contiguously follows the current block in memory. The last free block points to END_OF_FREELIST.

Definition at line 28 of file ssm-mem.c.

Field Documentation

◆ free_list_next

union block* free_list_next

Pointer to the next block.

Definition at line 29 of file ssm-mem.c.

◆ block_buf

uint8_t block_buf[1]

Variable-size buffer of the block.

Definition at line 30 of file ssm-mem.c.


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