MV is a general-purpose manually managed pool class that manages blocks of variable size.
#include "mpscmv.h"
Return the pool class for an MV (Manual Variable) pool.
When creating an MV pool, mps_pool_create_k() may take three keyword arguments:
The mean and maximum sizes are hints to the MPS: the pool will be less efficient if these are wrong, but nothing will break.
For example:
MPS_ARGS_BEGIN(args) {
MPS_ARGS_ADD(ARGS, MPS_KEY_MEAN_SIZE, 32);
MPS_ARGS_ADD(ARGS, MPS_KEY_MAX_SIZE, 1024);
MPS_ARGS_ADD(ARGS, MPS_KEY_EXTEND_BY, 1024 * 1024);
MPS_ARGS_DONE(args);
res = mps_pool_create_k(&pool, arena, mps_class_mfs(), args);
} MPS_ARGS_END(args);
Deprecated
starting with version 1.112.
When using mps_pool_create(), pass the segment size, mean size, and maximum size like this:
mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena,
mps_class_t mps_class_mv(),
mps_size_t extend_size,
mps_size_t average_size,
mps_size_t maximum_size)
A debugging version of the MV pool class.
When creating a debugging MV pool, mps_pool_create_k() requires four keyword arguments: MPS_KEY_EXTEND_SIZE, MPS_KEY_MEAN_SIZE, MPS_KEY_MAX_SIZE are as described above, and MPS_KEY_POOL_DEBUG_OPTIONS specifies the debugging options. See mps_debug_option_s.
Deprecated
starting with version 1.112.
When using mps_pool_create(), pass the debugging options, segment size, mean size, and maximum size like this:
mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena,
mps_class_t mps_class_mv_debug(),
mps_debug_option_s debug_option,
mps_size_t extend_size,
mps_size_t average_size,
mps_size_t maximum_size)
#include "mpscmv.h"
Return the total amount of free space in an MV pool.
pool is the MV pool.
Returns the total free space in the pool, in bytes(1).
Return the total size of an MV pool.
pool is the MV pool.
Returns the total size of the pool, in bytes(1). This is the sum of allocated space and free space.