#include <oskit/amm.h>amm_entry_t *amm_select(amm_t *amm, oskit_addr_t addr, oskit_size_t size);
Return a map entry in amm describing the range [addr - addr+size-1]. If either the start or end address is contained within an entry, the entry is split to create one starting or ending at the desired address.Note that the desired range may still be described by multiple entries. Amm_select only guarantees that there is an entry starting at addr and an entry ending at addr+size-1.
This function returns a pointer to the selected entry. In the event that the desired range is described by multiple entries, amm_select returns the first entry. Successive entries may be obtained using amm_find_addr using the end address of the current entry (amm_entry_end).
- amm
- A pointer to the amm_t structure representing the address map.
- addr
- Start address of the desired range.
- size
- Size of the desired range.
Returns a pointer to the first entry describing the range.
amm_split_func, amm_find_addr, amm_entry_field