From 3eb1788bb4236cd983f1230ee14e2adb1b5b3ff5 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 29 Apr 2010 14:31:31 -0300 Subject: new way to control GC speed (keeping a 'debt' counter) --- lstate.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 734898d0..28fd8d92 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.62 2010/04/12 16:07:06 roberto Exp roberto $ +** $Id: lstate.h,v 2.63 2010/04/13 20:48:12 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -116,7 +116,7 @@ typedef struct global_State { lua_Alloc frealloc; /* function to reallocate memory */ void *ud; /* auxiliary data to `frealloc' */ lu_mem totalbytes; /* number of bytes currently allocated */ - lu_mem GCthreshold; /* when totalbytes > GCthreshold, run GC step */ + l_mem GCdebt; /* when positive, run a GC step */ lu_mem lastmajormem; /* memory in use after last major collection */ stringtable strt; /* hash table for strings */ TValue l_registry; -- cgit v1.2.3-55-g6feb