mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-01-30 11:03:31 +00:00
MemArena/LazyMemoryRegion: Add EnsureMemoryPagesWritable function to ensure a region of bytes is writable without the caller needing to be aware of the windows-only BLOCK_SIZE value.
This commit is contained in:
parent
be0c852cd6
commit
fbb864a0b5
@ -187,6 +187,14 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
void EnsureMemoryPagesWritable(size_t offset, size_t size)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
for (const auto end_offset = offset + size; offset < end_offset; offset += BLOCK_SIZE)
|
||||
EnsureMemoryPageWritable(offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
void* m_memory = nullptr;
|
||||
size_t m_size = 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user