TNeo  v1.08
Data Fields
TN_FMem Struct Reference

Detailed Description

Fixed memory blocks pool.

Definition at line 80 of file tn_fmem.h.

Data Fields

enum TN_ObjId id_fmp
 id for object validity verification. More...
 
struct TN_ListItem wait_queue
 list of tasks waiting for free memory block
 
unsigned int block_size
 block size (in bytes); note that it should be a multiple of sizeof(TN_UWord}), use a macro TN_MAKE_ALIG_SIZE() for that. More...
 
int blocks_cnt
 capacity (total blocks count)
 
int free_blocks_cnt
 free blocks count
 
void * start_addr
 memory pool start address; note that it should be a multiple of sizeof(TN_UWord). More...
 
void * free_list
 Pointer to the first free memory block. More...
 

Field Documentation

◆ id_fmp

enum TN_ObjId TN_FMem::id_fmp

id for object validity verification.

This field is in the beginning of the structure to make it easier to detect memory corruption.

Definition at line 85 of file tn_fmem.h.

◆ block_size

unsigned int TN_FMem::block_size

block size (in bytes); note that it should be a multiple of sizeof(TN_UWord}), use a macro TN_MAKE_ALIG_SIZE() for that.

See also
TN_MAKE_ALIG_SIZE()

Definition at line 95 of file tn_fmem.h.

◆ start_addr

void* TN_FMem::start_addr

memory pool start address; note that it should be a multiple of sizeof(TN_UWord).

Definition at line 105 of file tn_fmem.h.

◆ free_list

void* TN_FMem::free_list

Pointer to the first free memory block.

Each free block contains the pointer to the next free memory block as the first word, or NULL if this is the last block.

Definition at line 110 of file tn_fmem.h.


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