[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: memory leak when call do_buffer
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 23 Jul 2002 09:25:58 -0300
>In case the provided buffer consists of precompiled bytecode that just
>declares functions, the globals are created, but is the function body
>duplicated in memory, or is it used in-place ?
It's duplicated because there's no notion of static buffers. For all Lua knows
or cares, you may free the buffer after lua_dobuffer. (I do see how this is
a waste, specially in small systems. I'd like a clean solution for this;
right now, the easiest thing is to change lundump.c to avoid the duplication,
which shold be fairly easy to do.)
--lhf