From a04e0ffdb9be42a77b5657f46cac8d7faa5a0f43 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 6 Sep 2024 14:38:39 -0300 Subject: Rename of fields in global state that control GC All fields in the global state that control the pace of the garbage collector prefixed with 'GC'. --- lmem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lmem.c') diff --git a/lmem.c b/lmem.c index 52a4f999..f18ea172 100644 --- a/lmem.c +++ b/lmem.c @@ -151,7 +151,7 @@ void luaM_free_ (lua_State *L, void *block, size_t osize) { global_State *g = G(L); lua_assert((osize == 0) == (block == NULL)); callfrealloc(g, block, osize, 0); - g->totalbytes -= osize; + g->GCtotalbytes -= osize; } @@ -181,10 +181,10 @@ void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { if (l_unlikely(newblock == NULL && nsize > 0)) { newblock = tryagain(L, block, osize, nsize); if (newblock == NULL) /* still no memory? */ - return NULL; /* do not update 'totalbytes' */ + return NULL; /* do not update 'GCtotalbytes' */ } lua_assert((nsize == 0) == (newblock == NULL)); - g->totalbytes += nsize - osize; + g->GCtotalbytes += nsize - osize; return newblock; } @@ -209,7 +209,7 @@ void *luaM_malloc_ (lua_State *L, size_t size, int tag) { if (newblock == NULL) luaM_error(L); } - g->totalbytes += size; + g->GCtotalbytes += size; return newblock; } } -- cgit v1.2.3-55-g6feb