aboutsummaryrefslogtreecommitdiff
path: root/src/lj_gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_gc.c')
-rw-r--r--src/lj_gc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c
index 2a4d299b..fba932ba 100644
--- a/src/lj_gc.c
+++ b/src/lj_gc.c
@@ -678,7 +678,8 @@ int LJ_FASTCALL lj_gc_step(lua_State *L)
678 lim = (GCSTEPSIZE/100) * g->gc.stepmul; 678 lim = (GCSTEPSIZE/100) * g->gc.stepmul;
679 if (lim == 0) 679 if (lim == 0)
680 lim = LJ_MAX_MEM; 680 lim = LJ_MAX_MEM;
681 g->gc.debt += g->gc.total - g->gc.threshold; 681 if (g->gc.total > g->gc.threshold)
682 g->gc.debt += g->gc.total - g->gc.threshold;
682 do { 683 do {
683 lim -= (MSize)gc_onestep(L); 684 lim -= (MSize)gc_onestep(L);
684 if (g->gc.state == GCSpause) { 685 if (g->gc.state == GCSpause) {