Posted by
jbsnyder on
URL: http://elua-development.15.s1.nabble.com/GC-Parameters-Emergency-Collection-tp2846858p2852767.html
Sent from my iPhone
On May 9, 2009, at 2:41 PM, Bogdan Marinescu
<
[hidden email]> wrote:
>
> 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.
Ditto. Thanks for getting this up and going. I will do some testing
with this, this weekend if I get a chance. I'm curious if this might
allow pushing limits a bit more where we would previously run out of
memory where the problem could be helped by emergency gc.
>
>
> 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.
Looking forward to this as well. One thing I've been mentioning when
I've been trying to sell the idea of eLua to people is the potential
to mock the eLua environment on a desktop for not just debugging but
for simulating algorithm behavior and performance.
I also don't use gdb over jtag much. I try to test as much as
possible on the targets through the lua side.
>
>
> 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 :)
These features of egc were what actually what lead me to post the
question about whether we could make just a really simple egc patch.
But since it applies cleanly now I'll have to try it with both egc and
the extra memory usage features :)
>
>
> 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 :)
>
Would the torture tests for the egc patch work in really low memory
conditions like with 64k of SRAM?
I think we should also have a general test suite for to simplify the
verification of builds across our multiple platforms. I think I may
start after luarpc is working with eLua.
> Best,
> Bogdan
>
>
> _______________________________________________
> Elua-dev mailing list
>
[hidden email]
>
https://lists.berlios.de/mailman/listinfo/elua-dev_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev