Closed fry closed 2 years ago
Thank you for your PR, and sorry for the delay. I believe submaps are more compatible with the cross-platform definition of a virtual memory page, so I view this as an improvement.
As for max_protection
, I've never had a use case for it myself, but I'll revise it and add platform-specific integrations where applicable.
submaps were being ignored, region::query returned the topmost page. switch to using mach_vm_region_recurse with a max depth
particularly, mach_vm_region returns the top level map, not that of a potential submap at a queried address, while mach_vm_region_recurse can return the details of the lowest map
the old functionality might be wanted at times, too, perhaps a macos specific query parameter makes sense?
additionally add a max_protection field to the Region structure