ChibiOS 21.11.4
chmempools.h File Reference

Memory Pools macros and structures. More...

Go to the source code of this file.

Data Structures

struct  pool_header
 Memory pool free object header. More...
struct  memory_pool_t
 Memory pool descriptor. More...
struct  guarded_memory_pool_t
 Guarded memory pool descriptor. More...

Macros

#define __MEMORYPOOL_DATA(name, size, align, provider)
 Data part of a static memory pool initializer.
#define MEMORYPOOL_DECL(name, size, align, provider)
 Static memory pool initializer.
#define __GUARDEDMEMORYPOOL_DATA(name, size, align)
 Data part of a static guarded memory pool initializer.
#define GUARDEDMEMORYPOOL_DECL(name, size, align)
 Static guarded memory pool initializer.

Functions

void chPoolObjectInitAligned (memory_pool_t *mp, size_t size, unsigned align, memgetfunc_t provider)
 Initializes an empty memory pool.
void chPoolLoadArray (memory_pool_t *mp, void *p, size_t n)
 Loads a memory pool with an array of static objects.
void * chPoolAllocI (memory_pool_t *mp)
 Allocates an object from a memory pool.
void * chPoolAlloc (memory_pool_t *mp)
 Allocates an object from a memory pool.
void chPoolFreeI (memory_pool_t *mp, void *objp)
 Releases an object into a memory pool.
void chPoolFree (memory_pool_t *mp, void *objp)
 Releases an object into a memory pool.
void chGuardedPoolObjectInitAligned (guarded_memory_pool_t *gmp, size_t size, unsigned align)
 Initializes an empty guarded memory pool.
void chGuardedPoolLoadArray (guarded_memory_pool_t *gmp, void *p, size_t n)
 Loads a guarded memory pool with an array of static objects.
void * chGuardedPoolAllocTimeoutS (guarded_memory_pool_t *gmp, sysinterval_t timeout)
 Allocates an object from a guarded memory pool.
void * chGuardedPoolAllocTimeout (guarded_memory_pool_t *gmp, sysinterval_t timeout)
 Allocates an object from a guarded memory pool.
void chGuardedPoolFree (guarded_memory_pool_t *gmp, void *objp)
 Releases an object into a guarded memory pool.
static void chPoolObjectInit (memory_pool_t *mp, size_t size, memgetfunc_t provider)
 Initializes an empty memory pool.
static void chPoolAdd (memory_pool_t *mp, void *objp)
 Adds an object to a memory pool.
static void chPoolAddI (memory_pool_t *mp, void *objp)
 Adds an object to a memory pool.
static void chGuardedPoolObjectInit (guarded_memory_pool_t *gmp, size_t size)
 Initializes an empty guarded memory pool.
static cnt_t chGuardedPoolGetCounterI (guarded_memory_pool_t *gmp)
 Gets the count of objects in a guarded memory pool.
static void * chGuardedPoolAllocI (guarded_memory_pool_t *gmp)
 Allocates an object from a guarded memory pool.
static void chGuardedPoolFreeI (guarded_memory_pool_t *gmp, void *objp)
 Releases an object into a guarded memory pool.
static void chGuardedPoolFreeS (guarded_memory_pool_t *gmp, void *objp)
 Releases an object into a guarded memory pool.
static void chGuardedPoolAdd (guarded_memory_pool_t *gmp, void *objp)
 Adds an object to a guarded memory pool.
static void chGuardedPoolAddI (guarded_memory_pool_t *gmp, void *objp)
 Adds an object to a guarded memory pool.
static void chGuardedPoolAddS (guarded_memory_pool_t *gmp, void *objp)
 Adds an object to a guarded memory pool.

Detailed Description

Memory Pools macros and structures.

Definition in file chmempools.h.