Reference Manual For QP/C 8.1.5
Loading...
Searching...
No Matches
qmpool.h File Reference

QP/C native platform-independent memory pool QMPool interface. More...

Go to the source code of this file.

Classes

class  QMPool
 Native QF Memory Pool. More...

Macros

#define QF_MPOOL_EL(evType_)
 Memory pool element to allocate correctly aligned storage for QMPool class.

Typedefs

typedef uint16_t QMPoolSize
 The data type to store the block-size based on the macro QF_MPOOL_SIZ_SIZE.
typedef uint16_t QMPoolCtr
 The data type to store the block-counter based on the macro QF_MPOOL_CTR_SIZE.

Detailed Description

QP/C native platform-independent memory pool QMPool interface.

Forward Traceability

  • [MISRA_QP_DVR_MC5_D4_8] MISRA-C:2025 Directive 4.8(Advisory): If a pointer to a structure or union is never dereferenced within a translation unit then the implementation of the object should be hidden

Definition in file qmpool.h.

Macro Definition Documentation

◆ QF_MPOOL_EL

#define QF_MPOOL_EL ( evType_)
Value:
struct { \
void * sto_[((sizeof(evType_) - 1U) / sizeof(void *)) + \
(sizeof(evType_) < (2U * sizeof(void *)) ? 2U : 1U)]; }

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

Parameters
[in]evType_event type (name of the subclass of QEvt)

Usage

See usage in QF::QF_poolInit().

Forward Traceability

  • [MISRA_QP_DVR_MC5_D4_9F] MISRA-C:2025 Directive 4.9(Advisory): A function should be used in preference to a function-like macro where they are interchangeable (FALSE-POSITIVE diagnostics)

Definition at line 39 of file qmpool.h.

Typedef Documentation

◆ QMPoolSize

typedef uint16_t QMPoolSize

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

Details

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 47 of file qmpool.h.

◆ QMPoolCtr

typedef uint16_t QMPoolCtr

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

Details

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

Definition at line 57 of file qmpool.h.