#include <oskit/lmm.h>oskit_size_t lmm_avail(lmm_t *lmm, lmm_flags_t *flags);
This routine returns the number of bytes of free memory currently exist in the specified LMM memory pool of a certain memory type, specified by the flags argument.Note that the returned value does not imply that a block of that size can be allocated; due to fragmentation it may only be possible to allocate memory in significantly smaller chunks.
- lmm
- The LMM pool in which to tally free memory.
- flags
- The memory type to determine the availability of. Only memory regions whose flags words contain all the bits set in the flags parameter will be considered in counting available memory. If flags is zero, then all free memory in the LMM pool will be counted.
Returns the number of bytes of free memory available of the requested memory type.