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.c | |
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.c')
-rw-r--r-- | lgc.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 2.126 2012/05/22 17:50:39 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 2.127 2012/05/22 18:38:56 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 | */ |
@@ -24,11 +24,8 @@ | |||
24 | 24 | ||
25 | 25 | ||
26 | 26 | ||
27 | /* how much to allocate before next GC step */ | ||
28 | #define GCSTEPSIZE (cast_int(256 * sizeof(void*))) | ||
29 | |||
30 | /* cost of sweeping one element (half the size of a small object) */ | 27 | /* cost of sweeping one element (half the size of a small object) */ |
31 | #define GCSWEEPCOST ((sizeof(TString) + 2) / 2) | 28 | #define GCSWEEPCOST ((sizeof(TString) + 4) / 2) |
32 | 29 | ||
33 | /* maximum number of elements to sweep in each single step */ | 30 | /* maximum number of elements to sweep in each single step */ |
34 | #define GCSWEEPMAX (cast_int((GCSTEPSIZE / GCSWEEPCOST) / 4)) | 31 | #define GCSWEEPMAX (cast_int((GCSTEPSIZE / GCSWEEPCOST) / 4)) |