[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Execution of pre compiled lua code from memory mapped files
- From: Michael Welsh Duggan <mwd@...>
- Date: Fri, 29 May 2015 10:38:13 -0400
Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> writes:
>> 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).
Thanks. I am happy that I now understand the issue. (And happier that
it doesn't obviate the reason I use this to put compiled lua code in my
binaries.)
--
Michael Welsh Duggan
(mwd@cert.org)