[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Execution of pre compiled lua code from memory mapped files
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 29 May 2015 11:24:48 -0300
> I'm confused. Although not part of the core library, luaL_loadbufferx()
> exists, and is implemented in a very small amount of code:
The point is that when Lua loads precompiled Lua code, it *copies* the
data to its internal data structures.
The question is about how to avoid this copy, especially in RAM
starved systems, when precompiled code is already stored in ROM.
The answer is that this is not very easy to do because the internal data
structures are not prepared to handle some data in Lua core land and
some data in user land, although recently it does support strings in
user land (at a cost, since it avoids interning them).