[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how to tune generational collector in work3?
- From: "Juris Kalnins" <juris@...>
- Date: Tue, 01 Jun 2010 14:09:55 +0300
On Tue, 01 Jun 2010 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 */