aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-02-23 18:07:34 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-02-23 18:07:34 -0300
commitf5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9 (patch)
tree84f67f71a728bc988661349c361f2a968b1d4910 /lstate.h
parente6c1e6005a9346d378e004a6d6e7fd98c7ee191b (diff)
downloadlua-f5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9.tar.gz
lua-f5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9.tar.bz2
lua-f5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9.zip
generational collection: new attempt (still incomplete)
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lstate.h b/lstate.h
index 67efa7f2..51128db1 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.h,v 2.133 2016/12/22 13:08:50 roberto Exp roberto $ 2** $Id: lstate.h,v 2.134 2017/02/15 18:52:13 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -70,7 +70,8 @@ struct lua_longjmp; /* defined in ldo.c */
70 70
71/* kinds of Garbage Collection */ 71/* kinds of Garbage Collection */
72#define KGC_NORMAL 0 72#define KGC_NORMAL 0
73#define KGC_EMERGENCY 1 /* gc was forced by an allocation failure */ 73#define KGC_GEN 1 /* generational gc */
74#define KGC_EMERGENCY 2 /* gc was forced by an allocation failure */
74 75
75 76
76typedef struct stringtable { 77typedef struct stringtable {
@@ -158,6 +159,9 @@ typedef struct global_State {
158 GCObject *allweak; /* list of all-weak tables */ 159 GCObject *allweak; /* list of all-weak tables */
159 GCObject *tobefnz; /* list of userdata to be GC */ 160 GCObject *tobefnz; /* list of userdata to be GC */
160 GCObject *fixedgc; /* list of objects not to be collected */ 161 GCObject *fixedgc; /* list of objects not to be collected */
162 /* fields for generational collector */
163 GCObject *old; /* start of old objects */
164 GCObject *survival; /* start of objects that survived one GC cycle */
161 struct lua_State *twups; /* list of threads with open upvalues */ 165 struct lua_State *twups; /* list of threads with open upvalues */
162 unsigned int gcfinnum; /* number of finalizers to call in each GC step */ 166 unsigned int gcfinnum; /* number of finalizers to call in each GC step */
163 int gcpause; /* size of pause between successive GCs */ 167 int gcpause; /* size of pause between successive GCs */