Function region::query_range[][src]

pub fn query_range(address: *const u8, size: usize) -> Result<Vec<Region>>

Queries the OS with a range, returning the regions it contains.

A 2-byte range straddling a page boundary will return both pages (or one region, if the pages have the same properties). The implementation uses query internally.

Examples

let data = [0; 100];
let region = region::query_range(data.as_ptr(), data.len()).unwrap();

assert!(region.len() > 0);