MemoryUtil: get executable pages near static data

and clean up a bit.
This commit is contained in:
Tillmann Karras
2015-05-02 11:57:17 +02:00
parent a0597f0d62
commit d4538c762f
9 changed files with 33 additions and 114 deletions

View File

@ -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);
}