[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua string library partially reimplemented in Lua
- From: Mike Pall <mikelu-0810@...>
- Date: Fri, 3 Oct 2008 15:27:46 +0200
Florian Weimer wrote:
> * Mike Pall:
> > But the resulting code is almost on par with the code a C compiler
> > generates. Excerpt from round 19/20:
> Nice. How much non-shareable core memory does the JITter need?
Depends on the size of the code that is actually traced. I.e. it
depends on your application. A few kilobytes suffice to hold the
IR for most use cases. It's a very compact linear IR with 8 bytes
per instruction plus some auxilliary data like the exit map. The
bytecode (containing all code, not just the traced code) is often
the bigger memory hog.
And then there's the machine code buffer which is mmap'ed (the
memory needs to be marked as executable) and so weighs in with a
multiple of the page size (4K on x86).
About shared code sizes: the VM itself is ~110K and the JIT
compiler is ~30K right now (and will hopefully stay below 50K).