Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
[SectionMemoryManager] Don't just drop the RO free list
Browse files Browse the repository at this point in the history
In r255760, I optimized the SectionMemoryManager to make better use
of virtual memory on platforms where the allocation granularity was
bigger than the protection granularity. As part of this, fixing up
the free list became more complicated and was moved into
`applyMemoryGroupPermissions`. Unfortunately, I forgot to actually
remove the call that drops the free list for RO memory (I did
remove the corresponding one for RX memory), defeating the whole
optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257293 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Keno committed Jan 10, 2016
1 parent d046f20 commit 1f644cd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/ExecutionEngine/SectionMemoryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ bool SectionMemoryManager::finalizeMemory(std::string *ErrMsg)
return true;
}

// Don't allow free memory blocks to be used after setting protection flags.
RODataMem.FreeMem.clear();

// Make read-only data memory read-only.
ec = applyMemoryGroupPermissions(RODataMem,
sys::Memory::MF_READ | sys::Memory::MF_EXEC);
Expand Down

0 comments on commit 1f644cd

Please sign in to comment.