summaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-08-07 09:18:11 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-08-07 09:18:11 -0300
commit623e388bb4c75eb07af3b7f83c736841d9fb76f0 (patch)
treef0c64d3c1b0f385b1b31536dd46ccd0c55b57a0b /lstate.h
parent677d90165ffef728231340c6328e9661824dbc34 (diff)
downloadlua-623e388bb4c75eb07af3b7f83c736841d9fb76f0.tar.gz
lua-623e388bb4c75eb07af3b7f83c736841d9fb76f0.tar.bz2
lua-623e388bb4c75eb07af3b7f83c736841d9fb76f0.zip
double-linked list of all upvalues elliminated and changed to a
traversal of all non-marked threads
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/lstate.h b/lstate.h
index ae8c5500..4eda35fd 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.h,v 2.82 2012/07/02 13:37:04 roberto Exp roberto $ 2** $Id: lstate.h,v 2.83 2013/08/05 16:58:28 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*/
@@ -20,17 +20,18 @@
20** be kept somehow accessible until being freed. 20** be kept somehow accessible until being freed.
21** 21**
22** Lua keeps most objects linked in list g->allgc. The link uses field 22** Lua keeps most objects linked in list g->allgc. The link uses field
23** 'next' of the CommonHeader. 23** 'next' of the CommonHeader. Threads (except the main one) ar kept
24** at the end of the 'allgc' list, after the 'l_registry' (which is
25** the first object to be added to the list).
24** 26**
25** Strings are kept in several lists headed by the array g->strt.hash. 27** Short strings are kept in several lists headed by the array g->strt.hash.
26** 28**
27** Open upvalues are not subject to independent garbage collection. They 29** Open upvalues are not subject to independent garbage collection. They
28** are collected together with their respective threads. Lua keeps a 30** are collected together with their respective threads. (They are
29** double-linked list with all open upvalues (g->uvhead) so that it can 31** always gray, so they must be remarked in the atomic step. Usually
30** mark objects referred by them. (They are always gray, so they must 32** their contents would be marked when traversing the respective
31** be remarked in the atomic step. Usually their contents would be marked 33** threads, but the thread may already be dead, while the upvalue is
32** when traversing the respective threads, but the thread may already be 34** still accessible through closures.)
33** dead, while the upvalue is still accessible through closures.)
34** 35**
35** Objects with finalizers are kept in the list g->finobj. 36** Objects with finalizers are kept in the list g->finobj.
36** 37**
@@ -133,7 +134,6 @@ typedef struct global_State {
133 GCObject *ephemeron; /* list of ephemeron tables (weak keys) */ 134 GCObject *ephemeron; /* list of ephemeron tables (weak keys) */
134 GCObject *allweak; /* list of all-weak tables */ 135 GCObject *allweak; /* list of all-weak tables */
135 GCObject *tobefnz; /* list of userdata to be GC */ 136 GCObject *tobefnz; /* list of userdata to be GC */
136 UpVal uvhead; /* head of double-linked list of all open upvalues */
137 Mbuffer buff; /* temporary buffer for string concatenation */ 137 Mbuffer buff; /* temporary buffer for string concatenation */
138 int gcpause; /* size of pause between successive GCs */ 138 int gcpause; /* size of pause between successive GCs */
139 int gcstepmul; /* GC `granularity' */ 139 int gcstepmul; /* GC `granularity' */