lua-users home
lua-l archive

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


Hi everyone

I have recently incorporated lua into a cable modem settop box.  The effort 
was very successful in demonstrating the usefulness of lua as a test and 
integration environment.  Also, lua applications have the ability of being 
downloaded from the cable head end.

The main problem with the lua environment was the dynamic memory management.  
Dynamic memory for the lua environment was taken from a fixed private heap of 
around 100k - 200k bytes.  The private heap which was used was taken from the 
back of the K&R C book.  Each memory block had a 16 byte overhead.  

Before I looked into redesigning the memory interface and possibly lua's 
interface to dynamic memory,  I wondered if there were any better ways all 
ready out there or better ways incorporated into up comming version of lua.

The problems can be summarized as follows:

1.  The garbage collector thresholds did not function correctly in a fixed 
heap size.  The script writers had to manually force garbage collection.

2.  The utilization of the heap was around 50%.  This implied that there were 
a significantly small objects being allocated???  This is a problem with C++ 
and special heaps are designed to solve this problem.

3.  For soft real time problems, the lua scripts were a successful solutions.  
Being greedy, I would like to extend the lua scripts into more real time 
areas such as 60Hz type applications.  Web postings seem to indicate that the 
game guys are possible interested in the same area.  Are there any garbage 
collectors now or currently planned that will allow lua to operate in that 
area?

Glenn Edgar