From 2a66b34f720cdfb34e3455eb3dbc7fb8aa931981 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sun, 20 May 2012 17:36:44 -0300 Subject: revamp of the GC pace control; more like 5.1: any X Kbytes allocated makes the GC handle f(X) Kbytes of objects --- lstate.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index f6c093b3..85359fe3 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.76 2012/01/25 21:05:40 roberto Exp roberto $ +** $Id: lstate.h,v 2.77 2012/02/01 21:57:15 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -113,7 +113,9 @@ typedef struct global_State { void *ud; /* auxiliary data to `frealloc' */ lu_mem totalbytes; /* number of bytes currently allocated - GCdebt */ l_mem GCdebt; /* bytes allocated not yet compensated by the collector */ + lu_mem GCmemtrav; /* memory traversed by the GC */ lu_mem lastmajormem; /* memory in use after last major collection */ + lu_mem estimate; stringtable strt; /* hash table for strings */ TValue l_registry; unsigned int seed; /* randomized seed for hashes */ -- cgit v1.2.3-55-g6feb