lua-users home
lua-l archive

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


>> I'm looking at writing some Lua programs for an embedded platform like eLua, and I have some questions about how Lua can perform in a "soft real-time" environment.  Lua appears to perform a lot of small dynamic memory allocations.  Is there a usable subset of the Lua language (not the libraries) that just uses the stack?

> What do you mean by stack?

The Lua stack

> Lua also allocates memory at runtime, for growing the Lua stack and other
> internal structures, and also when creating strings (notably implicitly
> when converting things to strings for output).

It's those internal structures that concern me.  My goal is to try to minimize the use of the heap because no dynamic memory allocator is perfect.

> Perhaps it will help if you could tell us what kind of Lua programs you
> intend to run.

I'm thinking about using Lua to write programs for microcontrollers.  My concern is with determining the upper bound runtime of chunks of Lua code.  For example, I like to know my interrupt service routine won't miss an interrupt.
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential or proprietary to K&L Microwave, Inc. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, immediately contact the sender by reply e-mail and destroy all copies of the original message.