summaryrefslogtreecommitdiff
path: root/src/lj_parse.c
diff options
context:
space:
mode:
authorMike Pall <mike>2009-12-29 04:36:35 +0100
committerMike Pall <mike>2009-12-29 04:36:35 +0100
commit24429ed1f5c52258700e2e16c898c1dd9b8c4203 (patch)
tree984fd197d92070fe6e04edbe237444ee44b5b0c5 /src/lj_parse.c
parent81c9f5de89a03396ca80cd84e7c68552df7fd9f4 (diff)
downloadluajit-24429ed1f5c52258700e2e16c898c1dd9b8c4203.tar.gz
luajit-24429ed1f5c52258700e2e16c898c1dd9b8c4203.tar.bz2
luajit-24429ed1f5c52258700e2e16c898c1dd9b8c4203.zip
Fix alloc/free sizes of internal GCRef arrays.
Diffstat (limited to 'src/lj_parse.c')
-rw-r--r--src/lj_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_parse.c b/src/lj_parse.c
index 1de07e92..4aa23a1b 100644
--- a/src/lj_parse.c
+++ b/src/lj_parse.c
@@ -1140,7 +1140,7 @@ static void collectk(FuncState *fs, GCproto *pt)
1140 checklimitgt(fs, fs->nkn, BCMAX_D+1, "constants"); 1140 checklimitgt(fs, fs->nkn, BCMAX_D+1, "constants");
1141 checklimitgt(fs, fs->nkgc, BCMAX_D+1, "constants"); 1141 checklimitgt(fs, fs->nkgc, BCMAX_D+1, "constants");
1142 nkgc = round_nkgc(fs->nkgc); 1142 nkgc = round_nkgc(fs->nkgc);
1143 sizek = (MSize)(nkgc*sizeof(MRef) + fs->nkn*sizeof(lua_Number)); 1143 sizek = (MSize)(nkgc*sizeof(GCRef) + fs->nkn*sizeof(lua_Number));
1144 kstart = lj_mem_newt(fs->L, sizek, GCRef); 1144 kstart = lj_mem_newt(fs->L, sizek, GCRef);
1145 if (nkgc) setgcrefnull(kstart[0]); /* May be uninitialized otherwise. */ 1145 if (nkgc) setgcrefnull(kstart[0]); /* May be uninitialized otherwise. */
1146 pt->k.gc = kstart + nkgc; 1146 pt->k.gc = kstart + nkgc;