[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Execution of bytecodes
- From: Peter Cawley <lua@...>
- Date: Fri, 2 Oct 2015 11:22:45 +0100
The general contract of the lua_load family is that the memory you
pass to lua_load only has to be valid for the duration of the call to
lua_load. As such, even when supplying bytecode and supplying all of
it in a single contiguous memory block, it'll be copied to newly
allocated memory.
On Fri, Oct 2, 2015 at 11:01 AM, Marc Balmer <marc@msys.ch> wrote:
> When I pass precompiled Lua bytecode to Lua using lua_loadXXX functions by passing a pointer to the bytecode in memory (e.g. after mmaping the file containing the byte code into memory), will that directly be used or will there new memory be allocated and the bytecode be copied?
>
> - Marc
>
>
>