diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-12-20 11:06:27 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-12-20 11:06:27 -0300 |
commit | 666e95a66d1a2ceb98bdf320980b3f655264a9c9 (patch) | |
tree | 663862abbb42c78f6bc31f7975777e60f8340ebe /lgc.h | |
parent | 4eda1acafa1a69224b2d4f786cf1ec8f7a4d9ac5 (diff) | |
download | lua-666e95a66d1a2ceb98bdf320980b3f655264a9c9.tar.gz lua-666e95a66d1a2ceb98bdf320980b3f655264a9c9.tar.bz2 lua-666e95a66d1a2ceb98bdf320980b3f655264a9c9.zip |
Option 0 for step multiplier makes GC non-incremental
Diffstat (limited to 'lgc.h')
-rw-r--r-- | lgc.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -182,12 +182,14 @@ | |||
182 | 182 | ||
183 | /* incremental */ | 183 | /* incremental */ |
184 | 184 | ||
185 | /* wait memory to double before starting new cycle */ | 185 | /* Number of objects must be LUAI_GCPAUSE% before starting new cycle */ |
186 | #define LUAI_GCPAUSE 200 | 186 | #define LUAI_GCPAUSE 300 |
187 | 187 | ||
188 | #define LUAI_GCMUL 300 /* step multiplier */ | 188 | /* Step multiplier. (Roughly, the collector handles LUAI_GCMUL% objects |
189 | for each new allocated object.) */ | ||
190 | #define LUAI_GCMUL 200 | ||
189 | 191 | ||
190 | /* how many objects to allocate before next GC step (log2) */ | 192 | /* How many objects to allocate before next GC step (log2) */ |
191 | #define LUAI_GCSTEPSIZE 8 /* 256 objects */ | 193 | #define LUAI_GCSTEPSIZE 8 /* 256 objects */ |
192 | 194 | ||
193 | 195 | ||
@@ -244,7 +246,7 @@ | |||
244 | LUAI_FUNC void luaC_fix (lua_State *L, GCObject *o); | 246 | LUAI_FUNC void luaC_fix (lua_State *L, GCObject *o); |
245 | LUAI_FUNC void luaC_freeallobjects (lua_State *L); | 247 | LUAI_FUNC void luaC_freeallobjects (lua_State *L); |
246 | LUAI_FUNC void luaC_step (lua_State *L); | 248 | LUAI_FUNC void luaC_step (lua_State *L); |
247 | LUAI_FUNC void luaC_runtilstate (lua_State *L, int statesmask); | 249 | LUAI_FUNC void luaC_runtilstate (lua_State *L, int state, int fast); |
248 | LUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency); | 250 | LUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency); |
249 | LUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz); | 251 | LUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz); |
250 | LUAI_FUNC GCObject *luaC_newobjdt (lua_State *L, int tt, size_t sz, | 252 | LUAI_FUNC GCObject *luaC_newobjdt (lua_State *L, int tt, size_t sz, |