diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-05-23 12:43:14 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-05-23 12:43:14 -0300 |
commit | e29f3a57511565caf117cf3c2e5e4ed8f22869cb (patch) | |
tree | c8a978355fba7ae68b5b9b8e2c8dfeb4afec641e /lgc.h | |
parent | 21ed264a38862a25964fc02365e1deea5ffcb6c9 (diff) | |
download | lua-e29f3a57511565caf117cf3c2e5e4ed8f22869cb.tar.gz lua-e29f3a57511565caf117cf3c2e5e4ed8f22869cb.tar.bz2 lua-e29f3a57511565caf117cf3c2e5e4ed8f22869cb.zip |
definition of 'GCSTEPSIZE' moved to header file + small changes
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 | */ |