[][src]Function sunrise_libuser::mem::find_free_address

pub fn find_free_address(size: usize, align: usize) -> Result<usize, Error>

Finds a free memory zone of the given size and alignment in the current process's virtual address space. Note that the address space is not reserved, a call to map_memory to that address space might fail if another thread maps to it first. It is recommended to use this function and the map syscall in a loop.

Panics

Panics on underflow when size = 0.

Panics on underflow when align = 0.