[llvm] r257293 - [SectionMemoryManager] Don't just drop the RO free list
Keno Fischer via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 10 10:17:12 PST 2016
Author: kfischer
Date: Sun Jan 10 12:17:12 2016
New Revision: 257293
URL: http://llvm.org/viewvc/llvm-project?rev=257293&view=rev
Log:
[SectionMemoryManager] Don't just drop the RO free list
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.
Modified:
llvm/trunk/lib/ExecutionEngine/SectionMemoryManager.cpp
Modified: llvm/trunk/lib/ExecutionEngine/SectionMemoryManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/SectionMemoryManager.cpp?rev=257293&r1=257292&r2=257293&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/SectionMemoryManager.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/SectionMemoryManager.cpp Sun Jan 10 12:17:12 2016
@@ -137,9 +137,6 @@ bool SectionMemoryManager::finalizeMemor
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);
More information about the llvm-commits
mailing list