region-rs
region-rs copied to clipboard
How to handle PAGE_GUARD on Windows?
Currently guarded regions on Windows are represented as a Region, where protection is equal to the guarded region's underlying protection, and guarded set to true.
This might be confusing, since library users may only check for protection & Protection::READ or is_readable(), and thereafter assume the memory region is accessible.
Is it more ergonomic to discard the underlying protection of guarded pages, and merely set protection to Protection::NONE whilst also retaining the guarded boolean flag?
This would mean that information is lost, but would most likely result in fewer surprises for the user.