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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c
index cd99f249..764d74a8 100644
--- a/src/lj_gc.c
+++ b/src/lj_gc.c
@@ -764,6 +764,7 @@ void *lj_mem_realloc(lua_State *L, void *p, MSize osz, MSize nsz)
764 if (p == NULL && nsz > 0) 764 if (p == NULL && nsz > 0)
765 lj_err_throw(L, LUA_ERRMEM); 765 lj_err_throw(L, LUA_ERRMEM);
766 lua_assert((nsz == 0) == (p == NULL)); 766 lua_assert((nsz == 0) == (p == NULL));
767 lua_assert(checkptr32(p));
767 g->gc.total = (g->gc.total - osz) + nsz; 768 g->gc.total = (g->gc.total - osz) + nsz;
768 return p; 769 return p;
769} 770}
@@ -775,6 +776,7 @@ void *lj_mem_newgco(lua_State *L, MSize size)
775 GCobj *o = (GCobj *)g->allocf(g->allocd, NULL, 0, size); 776 GCobj *o = (GCobj *)g->allocf(g->allocd, NULL, 0, size);
776 if (o == NULL) 777 if (o == NULL)
777 lj_err_throw(L, LUA_ERRMEM); 778 lj_err_throw(L, LUA_ERRMEM);
779 lua_assert(checkptr32(o));
778 g->gc.total += size; 780 g->gc.total += size;
779 setgcrefr(o->gch.nextgc, g->gc.root); 781 setgcrefr(o->gch.nextgc, g->gc.root);
780 setgcref(g->gc.root, o); 782 setgcref(g->gc.root, o);