From 0df6635711230ab306710056f621b6da59fac5ea Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 21 Aug 2013 17:09:51 -0300 Subject: "fixed" objects kept in a separated list (instead of being kept in 'allgc' list with a bit marking them) --- lstate.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 162fe614..1877b5d9 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.85 2013/08/20 17:46:34 roberto Exp roberto $ +** $Id: lstate.h,v 2.86 2013/08/21 19:21:16 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -24,6 +24,9 @@ ** at the end of the 'allgc' list, after the 'l_registry' (which is ** the first object to be added to the list). ** +** List 'fixedgc' keep objects that are not to be collected (currently +** only small strings, such as reserved words). +** ** Open upvalues are not subject to independent garbage collection. They ** are collected together with their respective threads. (They are ** always gray, so they must be remarked in the atomic step. Usually @@ -132,6 +135,7 @@ typedef struct global_State { GCObject *ephemeron; /* list of ephemeron tables (weak keys) */ GCObject *allweak; /* list of all-weak tables */ GCObject *tobefnz; /* list of userdata to be GC */ + GCObject *fixedgc; /* list of objects not to be collected */ Mbuffer buff; /* temporary buffer for string concatenation */ int gcpause; /* size of pause between successive GCs */ int gcstepmul; /* GC `granularity' */ -- cgit v1.2.3-55-g6feb