Open andykaylor opened 11 years ago
This was improved a bit in r191722. As of that revision, relocation entries are dropped after they are applied, which helps a lot in the case of a client with many small modules. There are definitely more opportunities for low cost, high return improvements. Discarding the initially generated object image after loading is complete is one possibility (though it would require fixing the problem with debugger registration happening at the wrong layer). It should also be possible to discard IR objects after code has been generated.
Extended Description
MCJIT and RuntimeDyld are currently fairly sloppy in their use of memory. Several objects that are only needed during the compiling and loading phases are kept in memory throughout the lifetime of the MCJIT engine. This makes use of MCJIT prohibitively expensive on devices where memory is limited.