Re: GC Parameters & Emergency Collection
Posted by
BogdanM on
URL: http://elua-development.15.s1.nabble.com/GC-Parameters-Emergency-Collection-tp2846858p2851203.html
Hello eLua list,
I am the creator of the Emergency Garbage Collection (EGC) patch for Lua
5.1.x. I joined this list because I have interest in using Lua VM with a
very low memory limit and I think that over laps with embedded systems.
Attached is a version of the EGC patch for eLua SVN revision 281. I just had
to updated line numbers so it would apply cleanly to eLua without any
warnings.
Many, many thanks for this !!! I wanted to do this for quite a while now, but didn't find the time to do it. Your patch is excellent for eLua and its goals, so it's a Great Thing to have it running on our targets. Thanks again.
For testing & debugging what tools do other people use? Remote gdb over
serial? I might be able to do more testing tomorrow, right now I am to
tired.
Personally I never used gdb over serial, although I have the required hardware for some of the targets. Then again, I didn't really low-level debugging, a LED or a serial connection did the job just fine for me. There are also plans for an "eLua simulator" that would run *inside* an OS (so you won't need the standalone version to test it), but this is quite vague at the moment, and will have to wait at least until we give eLua its own libc.
About 2/3 of the EGC patch is to make the resizing of the internal string
table & hashpart of Lua table use less memory. That is done by doing an
in-place resize of those tables. If the table is shrinking then the nodes
are moved to the start of the table then realloc is called to shrink the
table. If the table is growing then the realloc is done first before the
nodes are moved. All of these changes are in lstring.c & ltable.c and I
don't see any conflict with the change eLua made to vanilla Lua.
Yet another very good thing for eLua :)
I still think that low memory systems should use the EGC to fully utilize the
limited memory they have.
And I couldn't agree with you more, and this why I feel so excited for having EGC in eLua. I'll have to think of a good batch of tests for making your patch shine in its full potential :)
Best,
Bogdan
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev