#include <oskit/lmm.h>void *lmm_alloc_page(lmm_t *lmm, lmm_flags_t flags);
This routine allocates a memory block that is exactly one minimum-size hardware page in size, and is naturally aligned to a page boundary. The same effect can be achieved by calling lmm_alloc_aligned with appropriate parameters; this routine merely provides a simpler interface for this extremely common action.
- lmm
- The memory pool from which to allocate.
- flags
- The memory type required for this allocation. For each bit set in the flags parameter, the corresponding bit in a region's flags word must also be set in order for the region to be considered for allocation. If the flags parameter is zero, memory will be allocated from any region.
Returns a pointer to the memory page allocated, or NULL if no naturally-aligned page can be found.