StephanvanSchaik / mmap-rs

A cross-platform and safe Rust API to create and manage memory mappings in the virtual address space of the calling process.
Apache License 2.0
61 stars 17 forks source link

Implement MemoryAreas::query() to query information about the memory area for a given address #16

Closed StephanvanSchaik closed 1 year ago

StephanvanSchaik commented 1 year ago

This PR implements MemoryAreas::query() to query information about the memory area for a given address as some platforms provide an API that does not require iterating the entire virtual address space. On platforms that do not provide such an API, we simply fallback to iterating the virtual address space until we find the corresponding area for the given address.