43Q_DEFINE_THIS_MODULE(
"qf_mem")
51 std::uint_fast32_t
const poolSize,
52 std::uint_fast16_t
const blockSize)
noexcept
63 std::uint_fast16_t inext = 2U;
74 std::uint32_t nTot = 1U;
77 for (std::uint_fast32_t size = poolSize -
m_blockSize;
78 size >=
static_cast<std::uint_fast32_t
>(
m_blockSize);
79 size -=
static_cast<std::uint_fast32_t
>(
m_blockSize))
82 pfb =
static_cast<void * *
>(pfb[0]);
88#if (QF_MPOOL_CTR_SIZE == 1U)
90#elif (QF_MPOOL_CTR_SIZE == 2U)
96 m_start =
static_cast<void * *
>(poolSto);
105 std::uint_fast16_t
const margin,
106 std::uint_fast8_t
const qsId)
noexcept
120 if (nFree >
static_cast<QMPoolCtr>(margin)) {
124 void * *
const pfb_next =
static_cast<void * *
>(pfb[0]);
177 std::uint_fast8_t
const qsId)
noexcept
183 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_)
#define QS_BEGIN_PRE(rec_, qsId_)
QS/C++ port to a 32-bit CPU, generic C++ compiler.
#define Q_ASSERT_INCRIT(id_, expr_)
#define Q_REQUIRE_INCRIT(id_, expr_)