42Q_DEFINE_THIS_MODULE(
"qf_mem")
50 std::uint_fast32_t
const poolSize,
51 std::uint_fast16_t
const blockSize)
noexcept
62 std::uint_fast16_t inext = 2U;
73 std::uint32_t nTot = 1U;
76 for (std::uint_fast32_t size = poolSize -
m_blockSize;
77 size >=
static_cast<std::uint_fast32_t
>(
m_blockSize);
78 size -=
static_cast<std::uint_fast32_t
>(
m_blockSize))
81 pfb =
static_cast<void * *
>(pfb[0]);
87#if (QF_MPOOL_CTR_SIZE == 1U)
89#elif (QF_MPOOL_CTR_SIZE == 2U)
95 m_start =
static_cast<void * *
>(poolSto);
104 std::uint_fast16_t
const margin,
105 std::uint_fast8_t
const qsId)
noexcept
119 if (nFree >
static_cast<QMPoolCtr>(margin)) {
123 void * *
const pfb_next =
static_cast<void * *
>(pfb[0]);
176 std::uint_fast8_t
const qsId)
noexcept
182 void * *
const pfb =
static_cast<void * *
>(block);
void * get(std::uint_fast16_t const margin, std::uint_fast8_t const qsId) noexcept
QMPoolCtr volatile m_nFree
void init(void *const poolSto, std::uint_fast32_t const poolSize, std::uint_fast16_t const blockSize) noexcept
void **volatile m_freeHead
void put(void *const block, std::uint_fast8_t const qsId) noexcept
#define Q_UNUSED_PAR(par_)
Helper macro to clearly mark unused parameters of functions.
Internal (package scope) QP/C++ interface.
#define QF_PTR_RANGE_(x_, min_, max_)
QS/C++ dummy public interface.
#define QS_BEGIN_PRE(rec_, qsId_)
QP Functional Safety (FuSa) Subsystem.
#define Q_ASSERT_INCRIT(id_, expr_)
General-purpose assertion with user-specified ID number (in critical section)
#define Q_REQUIRE_INCRIT(id_, expr_)
Assertion for checking a precondition (in critical section)