Reorder various structs to reduce padding (thanks to /usr/bin/pahole).

This commit is contained in:
Mike Pall
2010-03-15 23:29:10 +01:00
parent 1fea5cb822
commit 37a3ca330f
7 changed files with 15 additions and 15 deletions

View File

@@ -540,7 +540,7 @@ static void atomic(global_State *g, lua_State *L)
/* Prepare for sweep phase. */
g->gc.currentwhite = cast_byte(otherwhite(g)); /* Flip current white. */
g->gc.sweepstr = 0;
g->gc.sweep = &g->gc.root;
setmref(g->gc.sweep, &g->gc.root);
g->gc.state = GCSsweepstring;
g->gc.estimate = g->gc.total - (MSize)udsize; /* Initial estimate. */
}
@@ -569,8 +569,8 @@ static size_t gc_onestep(lua_State *L)
}
case GCSsweep: {
MSize old = g->gc.total;
g->gc.sweep = gc_sweep(g, g->gc.sweep, GCSWEEPMAX); /* Partial sweep. */
if (gcref(*g->gc.sweep) == NULL) {
setmref(g->gc.sweep, gc_sweep(g, mref(g->gc.sweep, GCRef), GCSWEEPMAX));
if (gcref(*mref(g->gc.sweep, GCRef)) == NULL) {
gc_shrink(g, L);
g->gc.state = GCSfinalize; /* End of sweep phase. */
}
@@ -649,7 +649,7 @@ void lj_gc_fullgc(lua_State *L)
setvmstate(g, GC);
if (g->gc.state <= GCSpropagate) { /* Caught somewhere in the middle. */
g->gc.sweepstr = 0;
g->gc.sweep = &g->gc.root; /* Sweep everything (preserving it). */
setmref(g->gc.sweep, &g->gc.root); /* Sweep everything (preserving it). */
setgcrefnull(g->gc.gray); /* Reset lists from partial propagation. */
setgcrefnull(g->gc.grayagain);
setgcrefnull(g->gc.weak);