3 #include <plugify/mem_addr.hpp>
4 #include <plugify/prot_flag.hpp>
5 #include <plugify_export.h>
48 bool IsValid() const noexcept {
return _status; }
56 ProtFlag _origProtection{ ProtFlag::UNSET };
65 int TranslateProtection(ProtFlag flags) noexcept;
73 ProtFlag TranslateProtection(
int prot) noexcept;
A wrapper class for memory addresses, providing utility functions for pointer manipulation.
A class to manage memory protection settings.
~MemProtector()
Destructor to restore the original protection settings if required.
ProtFlag OriginalProt() const noexcept
Gets the original protection settings.
bool IsValid() const noexcept
Checks if the memory protection was successfully set.
MemProtector(MemAddr address, size_t length, ProtFlag prot, bool unsetOnDestroy=true)
Constructs a MemProtector object to set memory protection.