diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-13 15:45:57 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-13 15:45:57 -0300 |
commit | 5d8b5b9290c932bdfd7dcc670a5af957bdd58392 (patch) | |
tree | 17915e03d62517c47ddf3dd7db6c07596f8d5748 /lgc.h | |
parent | 40565b4a089f44fdcb16f4ed0080b0ca3755e4aa (diff) | |
download | lua-5d8b5b9290c932bdfd7dcc670a5af957bdd58392.tar.gz lua-5d8b5b9290c932bdfd7dcc670a5af957bdd58392.tar.bz2 lua-5d8b5b9290c932bdfd7dcc670a5af957bdd58392.zip |
Changed signal of GC debt
Positive debts seems more natural then negative ones.
Diffstat (limited to 'lgc.h')
-rw-r--r-- | lgc.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -175,13 +175,13 @@ | |||
175 | 175 | ||
176 | 176 | ||
177 | /* | 177 | /* |
178 | ** Does one step of collection when debt becomes positive. 'pre'/'pos' | 178 | ** Does one step of collection when debt becomes zero. 'pre'/'pos' |
179 | ** allows some adjustments to be done only when needed. macro | 179 | ** allows some adjustments to be done only when needed. macro |
180 | ** 'condchangemem' is used only for heavy tests (forcing a full | 180 | ** 'condchangemem' is used only for heavy tests (forcing a full |
181 | ** GC cycle on every opportunity) | 181 | ** GC cycle on every opportunity) |
182 | */ | 182 | */ |
183 | #define luaC_condGC(L,pre,pos) \ | 183 | #define luaC_condGC(L,pre,pos) \ |
184 | { if (G(L)->GCdebt > 0) { pre; luaC_step(L); pos;}; \ | 184 | { if (G(L)->GCdebt <= 0) { pre; luaC_step(L); pos;}; \ |
185 | condchangemem(L,pre,pos); } | 185 | condchangemem(L,pre,pos); } |
186 | 186 | ||
187 | /* more often than not, 'pre'/'pos' are empty */ | 187 | /* more often than not, 'pre'/'pos' are empty */ |