QP/C  7.3.3
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qmpool.h File Reference

QP native, platform-independent memory pool QMPool interface. More...

Go to the source code of this file.

Classes

struct  QFreeBlock
 Structure representing a free block in QMPool. More...
 
class  QMPool
 Native QF Memory Pool. More...
 

Macros

#define QF_MPOOL_EL(evType_)
 

Typedefs

typedef uint16_t QMPoolSize
 
typedef uint16_t QMPoolCtr
 

Detailed Description

QP native, platform-independent memory pool QMPool interface.

Traceability

Definition in file qmpool.h.

Macro Definition Documentation

◆ QF_MPOOL_EL

#define QF_MPOOL_EL (   evType_)
Value:
struct { \
QFreeBlock sto_[((sizeof(evType_) - 1U) \
/ sizeof(QFreeBlock)) + 1U]; }
Structure representing a free block in QMPool.
Definition qmpool.h:81

Memory pool element to allocate correctly aligned storage for QMPool class.

Parameters
[in]evType_event type (name of the subclass of QEvt)
Traceability
Usage
static QF_MPOOL_EL(QEvt) smallPoolSto[CONFIG_QPC_SMALL_POOL_SIZE];
typedef struct {
QEvt super;
uint32_t data[CONFIG_QPC_MEDIUM_POOL_ENTRY_SIZE];
} mediumPool;
static QF_MPOOL_EL(mediumPool) mediumPoolSto[CONFIG_QPC_MEDIUM_POOL_SIZE];
typedef struct {
QEvt super;
uint32_t data[CONFIG_QPC_LARGE_POOL_ENTRY_SIZE];
} largePool;
static QF_MPOOL_EL(largePool) largePoolSto[CONFIG_QPC_LARGE_POOL_SIZE];
. . .
int_t main() {
. . .
// initialize Event Memory Pools...
QF_poolInit(smallPoolSto, sizeof(smallPoolSto), sizeof(smallPoolSto[0]));
QF_poolInit(mediumPoolSto, sizeof(mediumPoolSto), sizeof(mediumPoolSto[0]));
QF_poolInit(largePoolSto, sizeof(largePoolSto), sizeof(largePoolSto[0]));
. . .
}
#define QF_MPOOL_EL(evType_)
Definition qmpool.h:73
Event class.
Definition qp.h:147

Definition at line 73 of file qmpool.h.

Typedef Documentation

◆ QMPoolSize

The data type to store the block-size based on the macro QF_MPOOL_SIZ_SIZE.

The dynamic range of this data type determines the maximum size of blocks that can be managed by the native QF event pool.

Definition at line 56 of file qmpool.h.

◆ QMPoolCtr

The data type to store the block-counter based on the macro QF_MPOOL_CTR_SIZE.

The dynamic range of this data type determines the maximum number of blocks that can be stored in the pool.

Definition at line 66 of file qmpool.h.