[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Memory management
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 18 Jan 2000 15:43:36 -0200 (EDT)
>From firstname.lastname@example.org Wed Jan 12 08:31:31 2000
>From: "Olivier Thirion de Briel" <email@example.com>
> I am a novice in LUA and I am trying to understand how the memory
Like Roberto explained, Lua (not LUA!) has automatic memory management with
garbage collection, so you don't need to worry about it.
If you need, you can call collectgarbage (or lua_collectgarbage from C).
> My aim is to reduce LUA size (ROM and RAM) for embedded LUA.
You may want to strip down lbuiltin.c and also only include those libraries
that you need (eg, probably not lmathlib.c). Also, for embedded systems, you'll
probably not need the parser. You can use only precompiled chunks.
See src/luac/README and src/luac/stubs.c.
BTW, because the FAQ does not seem to really have taken off, I'm planning to
start a series of Lua Technical Notes, in which specific points of the language
and the implementation would be explained and discussed.
The very first LTN will be about reducing the size of Lua in embedded systems!