lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Correcting myself: Actual heap usage for the Lua interpreter as reported by collectgarbage('count') is 180 kB after initialization. Would still fit though ..

On Wed, 10 Jul 2019 at 22:25, Flemming Madsen <> wrote:
You should be able to do a fair bit with 256kB RAM. I have a nontrivial app layer implemented in roughly 3 kLOC of lua with a full Lua 5.3 + some bindings on an ESP32 and it consumes just over 100kB. This is not a data heavy app though, mostly business logic.


On Tue, 9 Jul 2019 at 17:39, Benjamin TERRIER <> wrote:
Le dim. 7 juil. 2019 à 06:39, Russell Haley <> a écrit :
> Can you get Lua on something with 1 MB storage and 256kb of Ram like a Nordicsemi chip?
> Or is that strictly eLua territory?
> I was playing with a TI Lanchpad that had those specs too:
> It was using FreeRTOS and the chip has a fairly complete posix API and a built in socket library. I would have liked to have a Lua interpreter running in a thread.
> Russ

I am trying to do something similar.
Compiling Lua without parser, dump and undump, it increases the size
of my final binary by 41 KB.
With the libraries base, bit32, coroutine, math, string and table, I
have a total increase of 83 KB.

So you should be good with the 1 MB storage. I still have to check the
RAM consumption and the size of Lua bytecode.