#include <oskit/lmm.h>void lmm_init(lmm_t *lmm);
This function initializes an LMM pool. The caller must provide a pointer to an lmm_t structure, which is typically (but doesn't have to be) statically allocated; the LMM system uses this structure to keep track of the state of the LMM pool. In subsequent LMM operations, the caller must pass back a pointer to the same lmm structure, which acts as a handle for the LMM pool.Note that the LMM pool initially contains no regions or free memory; thus, immediate attempts to allocate memory from it will fail. The caller must register one or more memory regions using lmm_add_region, and then add some free memory to the pool using lmm_add_free, before the LMM pool will become useful for servicing allocations.
- lmm
- A pointer to an uninitialized structure of type lmm_t which is to be used to represent the LMM pool.