lua-users home
lua-l archive

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


On Tuesday 10 August 2004 17:24, Erik Hougaard wrote:
> David Given wrote:
> >Well, unless you can lose the heap, then you're not going to be able to
> > get away without a garbage collector. Which means that you can't have
> > real-time capabilities, because you never know when you might run out of
> > heap space. The Java people have been fighting this for years; there just
> > does not seem to be any theoretical way out of it.
>
> LuaChip will have full support for the core language, or it will never
> see daylight ;-)
>
> Real-time support is not a must-have. In many applications its
> sufficient to have short time real-time.

In which case, all you have is a port of the standard Lua runtime to a device 
with an embedded OS --- which is trivial. Since Lua doesn't use any advanced 
features such as tasks, the embedded OS consists of a memory allocator and 
that's about it. You have a tiny embedded filesystem containing your scripts 
and the Lua runtime is set up to load and run one. You reconfigure the thing 
by rebuilding the ROM image with different scripts and blowing it again.

I'd say you'd need about 100kB of code for the Lua runtime and OS, and a few 
hundred kB of RAM. An ARM with a 128kB or 256kB ROM would do. If I wanted to 
be fancy, I'd use non-volatile memory and put a noddy filesystem on it, so 
that my device could save data. 128kB EPROM + 32kB NVRAM + 512kB RAM. You can 
get devices with all this plus the CPU core on one die...

-- 
+- David Given --McQ-+ "...you could wire up a *dead rat* to a DIMM
|  dg@cowlark.com    | socket, and the PC BIOS memory test would pass it
| (dg@tao-group.com) | just fine." --- Ethan Benson
+- www.cowlark.com --+