[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: .. garbage collection...
- From: "John Belmonte" <jvb@...>
- Date: Tue, 6 Feb 2001 15:53:35 +0900
> Yeah, this is a tricky bug. When we compile a chunk, we add the memory
> used by its code to the threshold, because usually this is not garbage;
> we then avoid useless GC cicles. But in your case, you keep running new
> chunks over and over, and those chunks do not use any extra memory!
> So, the counter nblocks never gets GCthreshold...
I just got burned by this also, by having a small lua_dostring in a main loop that just accesses
a variable or calls a function that uses no memory.
In fact if you want to make your computer very unhappy, run this Lua script:
while not nil do
dostring("return nil -- have a nice day!")