This commit is contained in:
momo5502 2022-09-02 19:43:15 +02:00
parent cf013601b8
commit 9bf0b94e29
2 changed files with 6 additions and 6 deletions

View File

@ -124,7 +124,7 @@ namespace memory
} }
} }
bool prope_for_read(const void* address, const size_t length, const uint64_t alignment) bool probe_for_read(const void* address, const size_t length, const uint64_t alignment)
{ {
__try __try
{ {
@ -139,13 +139,13 @@ namespace memory
void assert_readability(const void* address, const size_t length, const uint64_t alignment) void assert_readability(const void* address, const size_t length, const uint64_t alignment)
{ {
if (!prope_for_read(address, length, alignment)) if (!probe_for_read(address, length, alignment))
{ {
throw std::runtime_error("Access violation"); throw std::runtime_error("Access violation");
} }
} }
bool prope_for_write(const void* address, const size_t length, const uint64_t alignment) bool probe_for_write(const void* address, const size_t length, const uint64_t alignment)
{ {
__try __try
{ {
@ -160,7 +160,7 @@ namespace memory
void assert_writability(const void* address, const size_t length, const uint64_t alignment) void assert_writability(const void* address, const size_t length, const uint64_t alignment)
{ {
if (!prope_for_write(address, length, alignment)) if (!probe_for_write(address, length, alignment))
{ {
throw std::runtime_error("Access violation"); throw std::runtime_error("Access violation");
} }

View File

@ -27,10 +27,10 @@ namespace memory
_IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL)
void free_non_paged_memory(void* memory); void free_non_paged_memory(void* memory);
bool prope_for_read(const void* address, size_t length, uint64_t alignment = 1); bool probe_for_read(const void* address, size_t length, uint64_t alignment = 1);
void assert_readability(const void* address, size_t length, uint64_t alignment = 1); void assert_readability(const void* address, size_t length, uint64_t alignment = 1);
bool prope_for_write(const void* address, size_t length, uint64_t alignment = 1); bool probe_for_write(const void* address, size_t length, uint64_t alignment = 1);
void assert_writability(const void* address, size_t length, uint64_t alignment = 1); void assert_writability(const void* address, size_t length, uint64_t alignment = 1);
template <typename T, typename... Args> template <typename T, typename... Args>