lua-users home
lua-l archive

Re: how to tune generational collector in work3?

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


On 2010年6月01日 13:48:02 +0300, Juris Kalnins <juris@mt.lv> wrote:
However, with my test script and fprintf patch,
every short collection except the one immediately after
the full gc seems to collect 0 bytes, judging by the
value of totalbytes. It can also be seen
in my "[fixed version] ..." reply. Maybe it's again
misunderstanding on my part..
This fixes it:
diff -BubNrd lua-5.2.0-work3/src/lgc.c t/src/lgc.c
--- lua-5.2.0-work3/src/lgc.c 2010年05月17日 23:39:31.000000000 +0300
+++ t/src/lgc.c 2010年06月01日 14:09:07.000000000 +0300
@@ -932,6 +932,7 @@
 g->lastmajormem = g->totalbytes; /* update control */
 }
 else {
+ luaC_runtilstate(L, ~bitmask(GCSpause));
 luaC_runtilstate(L, bitmask(GCSpause)); /* run collection */
 if (g->totalbytes > g->lastmajormem/100 * g->gcpause)
 g->lastmajormem = 0; /* signal for a major collection */

AltStyle によって変換されたページ (->オリジナル) /