diff options
author | Mike Pall <mike> | 2014-04-22 11:29:05 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2014-04-22 11:29:05 +0200 |
commit | c8d1aff0bafcbfadb4a119685708c19788158cd6 (patch) | |
tree | 9501d4b89549058b727c386aac980da075df4995 /src/lj_gc.c | |
parent | 39acdb8b7f8542373d6a47538f9a712baa8fe7d6 (diff) | |
parent | 2715fe3aee7c8202b4b5d04748d1c5faa6d8fd9c (diff) | |
download | luajit-c8d1aff0bafcbfadb4a119685708c19788158cd6.tar.gz luajit-c8d1aff0bafcbfadb4a119685708c19788158cd6.tar.bz2 luajit-c8d1aff0bafcbfadb4a119685708c19788158cd6.zip |
Merge branch 'master' into v2.1
Diffstat (limited to 'src/lj_gc.c')
-rw-r--r-- | src/lj_gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c index 8fea9853..376c9d09 100644 --- a/src/lj_gc.c +++ b/src/lj_gc.c | |||
@@ -625,6 +625,8 @@ static size_t gc_onestep(lua_State *L) | |||
625 | case GCSsweep: { | 625 | case GCSsweep: { |
626 | MSize old = g->gc.total; | 626 | MSize old = g->gc.total; |
627 | setmref(g->gc.sweep, gc_sweep(g, mref(g->gc.sweep, GCRef), GCSWEEPMAX)); | 627 | setmref(g->gc.sweep, gc_sweep(g, mref(g->gc.sweep, GCRef), GCSWEEPMAX)); |
628 | lua_assert(old >= g->gc.total); | ||
629 | g->gc.estimate -= old - g->gc.total; | ||
628 | if (gcref(*mref(g->gc.sweep, GCRef)) == NULL) { | 630 | if (gcref(*mref(g->gc.sweep, GCRef)) == NULL) { |
629 | if (g->strnum <= (g->strmask >> 2) && g->strmask > LJ_MIN_STRTAB*2-1) | 631 | if (g->strnum <= (g->strmask >> 2) && g->strmask > LJ_MIN_STRTAB*2-1) |
630 | lj_str_resize(L, g->strmask >> 1); /* Shrink string table. */ | 632 | lj_str_resize(L, g->strmask >> 1); /* Shrink string table. */ |
@@ -638,8 +640,6 @@ static size_t gc_onestep(lua_State *L) | |||
638 | g->gc.debt = 0; | 640 | g->gc.debt = 0; |
639 | } | 641 | } |
640 | } | 642 | } |
641 | lua_assert(old >= g->gc.total); | ||
642 | g->gc.estimate -= old - g->gc.total; | ||
643 | return GCSWEEPMAX*GCSWEEPCOST; | 643 | return GCSWEEPMAX*GCSWEEPCOST; |
644 | } | 644 | } |
645 | case GCSfinalize: | 645 | case GCSfinalize: |