Make the JIT code emitter properly retry and ask for more memory when it runs
authorReid Kleckner <reid@kleckner.net>
Thu, 23 Jul 2009 00:49:59 +0000 (00:49 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 23 Jul 2009 00:49:59 +0000 (00:49 +0000)
commit81ce3ed08c4df0c246b378c8972062d2f49f1ce9
tree05ebfa127cf6703aeb1d5fd3001ada1823379973
parent95eb3ad353460c6987a9d1e03a3e3e12c75b4059
Make the JIT code emitter properly retry and ask for more memory when it runs
out of memory, and also make the default memory manager allocate more memory
when it runs out.

Also, switch function stubs and global data over to using the BumpPtrAllocator.

This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB
of memory, and instead allocates in 512K slabs.  I suspect this size could go
lower, especially on embedded platforms, now that more slabs can be allocated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76828 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ExecutionEngine/JITMemoryManager.h
include/llvm/System/Memory.h
lib/ExecutionEngine/JIT/JITEmitter.cpp
lib/ExecutionEngine/JIT/JITMemoryManager.cpp
lib/System/Unix/Memory.inc
lib/System/Win32/Memory.inc
tools/lli/lli.cpp
unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp [new file with mode: 0644]