Here is the second attempt to push CL after separating out the Globals...
1. Use mmap/mprotect instead of llvm::MemoryBlock to provide code memory
protection after I generate the code and do the linker relocation.
2. A blame assignment tool to find who is corrupting the JITted code and
the Stub/GOT (Global Offset Table).
3. Separate out Globals into another memory regions, otherwise, my JIT
will always get the blame when the JITted code attempts to writes to
the global.
4. New memory layout:
@mpCodeMem:
+--------------------------------------------------------------+
| Function Memory ... -> <- ... Stub/GOT |
+--------------------------------------------------------------+
|<------------------ Total: @MaxCodeSize KiB ----------------->|
|
, where size of GOT is @MaxGOTSize KiB.
|
@mpGVMem:
+--------------------------------------------------------------+
| Global variable ... -> |
+--------------------------------------------------------------+
|<--------------- Total: @MaxGlobalVarSize KiB --------------->|
|
, where the direction of arrows (-> and <-) shows memory's
growth direction when more space is needed.
Change-Id: I5a8ecff3face9412fe621f1140d4ed8010038197
1 file changed