[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Minimal Lua 5.x installations
- From: Flemming Madsen <lua@...>
- Date: Thu, 11 Jul 2019 08:38:28 +0200
Correcting myself: Actual heap usage for the Lua interpreter as reported by collectgarbage('count') is 180 kB after initialization. Would still fit though ..
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.
Le dim. 7 juil. 2019 à 06:39, Russell Haley <firstname.lastname@example.org> 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: http://www.ti.com/tool/cc3220sf-launchxl
> 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.
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.