Cleanup of memory vs. GC sizes. No functional changes.

This commit is contained in:
Mike Pall
2014-12-20 00:17:50 +01:00
parent 82e6e5fb5f
commit 6e9145a882
10 changed files with 39 additions and 35 deletions

View File

@@ -187,7 +187,7 @@ LUA_API lua_State *lua_newstate(lua_Alloc f, void *ud)
GG_State *GG = (GG_State *)f(ud, NULL, 0, sizeof(GG_State));
lua_State *L = &GG->L;
global_State *g = &GG->g;
if (GG == NULL || !checkptr32(GG)) return NULL;
if (GG == NULL || !checkptrGC(GG)) return NULL;
memset(GG, 0, sizeof(GG_State));
L->gct = ~LJ_TTHREAD;
L->marked = LJ_GC_WHITE0 | LJ_GC_FIXED | LJ_GC_SFIXED; /* Prevent free. */