diff options
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -9,7 +9,6 @@ | |||
9 | 9 | ||
10 | #include "lprefix.h" | 10 | #include "lprefix.h" |
11 | 11 | ||
12 | #include <stdio.h> | ||
13 | #include <string.h> | 12 | #include <string.h> |
14 | 13 | ||
15 | 14 | ||
@@ -1377,14 +1376,12 @@ static void genmajorstep (lua_State *L, global_State *g) { | |||
1377 | /* | 1376 | /* |
1378 | ** Does a generational "step". If the total number of objects grew | 1377 | ** Does a generational "step". If the total number of objects grew |
1379 | ** more than 'majormul'% since the last major collection, does a | 1378 | ** more than 'majormul'% since the last major collection, does a |
1380 | ** major collection. Otherwise, does a minor collection. The test | 1379 | ** major collection. Otherwise, does a minor collection. |
1381 | ** ('GCdebt' != 0) avoids major collections when the step originated from | ||
1382 | ** 'collectgarbage("step")'. | ||
1383 | */ | 1380 | */ |
1384 | static void genstep (lua_State *L, global_State *g) { | 1381 | static void genstep (lua_State *L, global_State *g) { |
1385 | l_obj majorbase = g->GClastmajor; /* count after last major collection */ | 1382 | l_obj majorbase = g->GClastmajor; /* count after last major collection */ |
1386 | l_obj majorinc = applygcparam(g, genmajormul, majorbase); | 1383 | l_obj majorinc = applygcparam(g, genmajormul, majorbase); |
1387 | if (g->GCdebt != 0 && gettotalobjs(g) > majorbase + majorinc) { | 1384 | if (gettotalobjs(g) > majorbase + majorinc && 0) { |
1388 | /* do a major collection */ | 1385 | /* do a major collection */ |
1389 | enterinc(g); | 1386 | enterinc(g); |
1390 | g->gckind = KGC_GENMAJOR; | 1387 | g->gckind = KGC_GENMAJOR; |