mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-06 08:09:19 +00:00
MemoryUtil: get executable pages near static data
and clean up a bit.
This commit is contained in:
parent
a0597f0d62
commit
d4538c762f
9 changed files with 33 additions and 114 deletions
|
@ -28,10 +28,10 @@ public:
|
|||
virtual ~CodeBlock() { if (region) FreeCodeSpace(); }
|
||||
|
||||
// Call this before you generate any code.
|
||||
void AllocCodeSpace(int size)
|
||||
void AllocCodeSpace(int size, void* hint = nullptr)
|
||||
{
|
||||
region_size = size;
|
||||
region = (u8*)AllocateExecutableMemory(region_size);
|
||||
region = (u8*)AllocateExecutableMemory(region_size, hint);
|
||||
T::SetCodePtr(region);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue