From 1ec251e091302515e54aa81d965840a5de4be0a1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 6 Jan 2025 12:41:39 -0300 Subject: Detail (debugging aid) When compiling with option HARDMEMTESTS, every creation of a new key in a table forces an emergency GC. --- lgc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lgc.h') diff --git a/lgc.h b/lgc.h index 339cc176..ee054179 100644 --- a/lgc.h +++ b/lgc.h @@ -224,15 +224,15 @@ */ #if !defined(HARDMEMTESTS) -#define condchangemem(L,pre,pos) ((void)0) +#define condchangemem(L,pre,pos,emg) ((void)0) #else -#define condchangemem(L,pre,pos) \ - { if (gcrunning(G(L))) { pre; luaC_fullgc(L, 0); pos; } } +#define condchangemem(L,pre,pos,emg) \ + { if (gcrunning(G(L))) { pre; luaC_fullgc(L, emg); pos; } } #endif #define luaC_condGC(L,pre,pos) \ { if (G(L)->GCdebt <= 0) { pre; luaC_step(L); pos;}; \ - condchangemem(L,pre,pos); } + condchangemem(L,pre,pos,0); } /* more often than not, 'pre'/'pos' are empty */ #define luaC_checkGC(L) luaC_condGC(L,(void)0,(void)0) -- cgit v1.2.3-55-g6feb