mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[ExecutionEngine] Initialize near block hint in SectionMemoryManager.
When allocating a new memory block in SectionMemoryManager, initialize the Near hint for the other memory groups if they have not been set already. Patch by Dana Koch. Thanks Dana!
This commit is contained in:
parent
0885e066d4
commit
abf1154870
@ -112,6 +112,15 @@ uint8_t *SectionMemoryManager::allocateSection(
|
||||
// Save this address as the basis for our next request
|
||||
MemGroup.Near = MB;
|
||||
|
||||
// Copy the address to all the other groups, if they have not
|
||||
// been initialized.
|
||||
if (CodeMem.Near.base() == 0)
|
||||
CodeMem.Near = MB;
|
||||
if (RODataMem.Near.base() == 0)
|
||||
RODataMem.Near = MB;
|
||||
if (RWDataMem.Near.base() == 0)
|
||||
RWDataMem.Near = MB;
|
||||
|
||||
// Remember that we allocated this memory
|
||||
MemGroup.AllocatedMem.push_back(MB);
|
||||
Addr = (uintptr_t)MB.base();
|
||||
|
Loading…
Reference in New Issue
Block a user