diff options
Diffstat (limited to 'lgc.h')
-rw-r--r-- | lgc.h | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.h,v 2.54 2012/05/11 19:22:33 roberto Exp roberto $ | 2 | ** $Id: lgc.h,v 2.55 2012/05/21 13:18:10 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 | */ |
@@ -20,13 +20,19 @@ | |||
20 | ** is that a black object can never point to a white one. Moreover, | 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, | 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 | 22 | ** allweak, ephemeron) so that it can be visited again before finishing |
23 | ** the collection cycle. (These rule does not apply to strings, | 23 | ** the collection cycle. These lists have no meaning when the invariant |
24 | ** which are never black but do not need to be visited again.) | 24 | ** is not being enforced (e.g., sweep phase). |
25 | ** These lists have no meaning when the invariant is not being enforced | ||
26 | ** (e.g., sweep phase). | ||
27 | */ | 25 | */ |
28 | 26 | ||
29 | 27 | ||
28 | |||
29 | /* how much to allocate before next GC step */ | ||
30 | #if !defined(GCSTEPSIZE) | ||
31 | /* ~100 small strings */ | ||
32 | #define GCSTEPSIZE (cast_int(100 * sizeof(TString))) | ||
33 | #endif | ||
34 | |||
35 | |||
30 | /* | 36 | /* |
31 | ** Possible states of the Garbage Collector | 37 | ** Possible states of the Garbage Collector |
32 | */ | 38 | */ |