QP/C
Data Fields
QMPool Struct Reference

Native QF Memory Pool. More...

#include <qmpool.h>

Data Fields

void * free_head
void * start
void * end
QMPoolSize blockSize
QMPoolCtr nTot
QMPoolCtr nFree
QMPoolCtr nMin

Detailed Description

Native QF Memory Pool.

This structure describes the native QF memory pool, which can be used as the event pool for dynamic event allocation, or as a fast, deterministic fixed block-size heap for any other objects in your application.

The QMPool structure contains only data members for managing a memory pool, but does not contain the pool storage, which must be provided externally during the pool initialization.

The native QF event pool is configured by defining the macro QF_EPOOL_TYPE_ as QMPool in the specific QF port header file.

Definition at line 103 of file qmpool.h.


Field Documentation

QMPoolSize QMPool::blockSize

maximum block size (in bytes)

Definition at line 118 of file qmpool.h.

void* QMPool::end

the last memory block managed by this memory pool

Definition at line 114 of file qmpool.h.

Referenced by QMPool_put().

The head of the linked list of free blocks

Definition at line 106 of file qmpool.h.

Referenced by QMPool_put().

QMPoolCtr QMPool::nFree

number of free blocks remaining

Definition at line 126 of file qmpool.h.

Referenced by QMPool_put().

QMPoolCtr QMPool::nMin

minimum number of free blocks ever present in this pool

Note:
this attribute remembers the low watermark of the pool, which provides a valuable information for sizing event pools.
See also:
QF_getPoolMargin().

Definition at line 134 of file qmpool.h.

QMPoolCtr QMPool::nTot

total number of blocks

Definition at line 122 of file qmpool.h.

Referenced by QMPool_put().

the original start this pool

Definition at line 110 of file qmpool.h.

Referenced by QMPool_put().


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