mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-27 02:10:34 +00:00
Remove a useless wrapper function
This commit is contained in:
parent
635b2ada43
commit
4a0437d0ed
@ -86,9 +86,9 @@ public:
|
||||
|
||||
void EndWrite() {
|
||||
// OK, we're done. Re-protect the memory we touched.
|
||||
if (PlatformIsWXExclusive()) {
|
||||
if (PlatformIsWXExclusive() && writeStart_ != nullptr) {
|
||||
const uint8_t *end = GetCodePtr();
|
||||
ProtectMemoryPages(writeStart_, end, MEM_PROT_READ | MEM_PROT_EXEC);
|
||||
ProtectMemoryPages(writeStart_, end - writeStart_, MEM_PROT_READ | MEM_PROT_EXEC);
|
||||
writeStart_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -37,9 +37,6 @@ void* AllocateExecutableMemory(size_t size);
|
||||
void* AllocateMemoryPages(size_t size, uint32_t memProtFlags);
|
||||
// Note that on platforms returning PlatformIsWXExclusive, you cannot set a page to be both readable and writable at the same time.
|
||||
bool ProtectMemoryPages(const void* ptr, size_t size, uint32_t memProtFlags);
|
||||
inline void ProtectMemoryPages(const void *start, const void *end, uint32_t memProtFlags) {
|
||||
ProtectMemoryPages((void *)start, (const uint8_t *)end - (const uint8_t *)start, memProtFlags);
|
||||
}
|
||||
void FreeMemoryPages(void* ptr, size_t size);
|
||||
|
||||
// Regular aligned memory. Don't try to apply memory protection willy-nilly to memory allocated this way as in-page alignment is unknown (though could be checked).
|
||||
|
Loading…
Reference in New Issue
Block a user