next up previous contents index
Next: 16.8.20 amm_split_func: Split a Up: 16.8 API reference Previous: 16.8.18 amm_reserve: Mark as

16.8.19 amm_select: Returns an entry describing an address range exactly

 

SYNOPSIS

#include <oskit/amm.h>

amm_entry_t *amm_select(amm_t *amm, oskit_addr_t addr, oskit_size_t size);

DESCRIPTION

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).

PARAMETERS

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

Returns a pointer to the first entry describing the range.

RELATED INFORMATION

amm_split_func, amm_find_addr, amm_entry_field



University of Utah Flux Research Group