aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lgc.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/lgc.h b/lgc.h
index 2b96eb2a..9dcaa1b1 100644
--- a/lgc.h
+++ b/lgc.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.h,v 2.31 2010/04/29 17:32:40 roberto Exp roberto $ 2** $Id: lgc.h,v 2.32 2010/04/29 21:43:36 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -11,6 +11,19 @@
11#include "lobject.h" 11#include "lobject.h"
12#include "lstate.h" 12#include "lstate.h"
13 13
14/*
15** Collectable objects may have one of three colors: white, which
16** means the object is not marked; gray, which means the
17** object is marked, but its references may be not marked; and
18** black, which means that the object and all its references are marked.
19** The main invariant of the garbage collector, while marking objects,
20** is that a black object can never point to a white one. Moreover,
21** any gray object must be in a "gray list" (gray, grayagain, weak,
22** allweak, ephemeron) so that it can be visited again before finishing
23** the collection cycle. These lists have no meaning when the invariant
24** is not being enforced (e.g., sweep phase).
25*/
26
14 27
15/* 28/*
16** Possible states of the Garbage Collector 29** Possible states of the Garbage Collector