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)
commit1a722d9b7306b9c14250bb6c86f104dc6bbfdded
tree73133062326a4574451485d682736eebb6f5970f
parent0228bc1a41fbd2b3cfecd05d6518bb424c9c34b4
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.

llvm-svn: 76828
llvm/include/llvm/ExecutionEngine/JITMemoryManager.h
llvm/include/llvm/System/Memory.h
llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
llvm/lib/System/Unix/Memory.inc
llvm/lib/System/Win32/Memory.inc
llvm/tools/lli/lli.cpp
llvm/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp [new file with mode: 0644]