xmempool 1.0
A Simple Memory Pool Implementation
Loading...
Searching...
No Matches
xmem_pool_block Struct Reference

xmempool - A Simple Memory Pool Implementation More...

Data Fields

char * start
 
uint32_t block_size
 
struct xmem_pool_block * next
 
uint32_t is_block_start
 

Detailed Description

xmempool - A Simple Memory Pool Implementation

Key Points:

  1. xmem_pool_handle points to the first pool in the chain.
  2. Each xmem_pool allocates a large memory space, divided into fixed-size blocks.
  3. free_blocks in xmem_pool points to a linked list of xmem_pool_block structures.
  4. Each xmem_pool_block's start points to an actual memory block in the pool's space.
  5. Freed blocks are always returned to the first pool for optimal performance.
  6. New pools are created and chained when the current pool is full.

Definition at line 26 of file xmempool.c.

Field Documentation

◆ block_size

uint32_t xmem_pool_block::block_size

Definition at line 28 of file xmempool.c.

◆ is_block_start

uint32_t xmem_pool_block::is_block_start

Definition at line 30 of file xmempool.c.

◆ next

struct xmem_pool_block* xmem_pool_block::next

Definition at line 29 of file xmempool.c.

◆ start

char* xmem_pool_block::start

Definition at line 27 of file xmempool.c.


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