#include <oskit/amm.h>int amm_protect(amm_t *amm, oskit_addr_t addr, oskit_size_t size, int prot);
Modifies the attribute flags associated with with all AMM_ALLOCATED entries within the specified address range. The resulting attributes are AMM_ALLOCATED|prot. AMM_RESERVED and AMM_FREE areas within the range are ignored.Amm_Protect is a simplified interface to amm_modify intended to be used with amm_init, amm_allocate, amm_deallocate, and amm_reserve.
- 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.
- prot
- New attribute flags to associate with the range.
Returns zero if successful, an error code otherwise.
amm_allocate, amm_deallocate, amm_init, amm_modify, amm_reserve