aboutsummaryrefslogtreecommitdiff
path: root/lgc.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-12-20 11:06:27 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-12-20 11:06:27 -0300
commit666e95a66d1a2ceb98bdf320980b3f655264a9c9 (patch)
tree663862abbb42c78f6bc31f7975777e60f8340ebe /lgc.h
parent4eda1acafa1a69224b2d4f786cf1ec8f7a4d9ac5 (diff)
downloadlua-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.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/lgc.h b/lgc.h
index 4cbc6e61..e8dee8a0 100644
--- a/lgc.h
+++ b/lgc.h
@@ -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 @@
244LUAI_FUNC void luaC_fix (lua_State *L, GCObject *o); 246LUAI_FUNC void luaC_fix (lua_State *L, GCObject *o);
245LUAI_FUNC void luaC_freeallobjects (lua_State *L); 247LUAI_FUNC void luaC_freeallobjects (lua_State *L);
246LUAI_FUNC void luaC_step (lua_State *L); 248LUAI_FUNC void luaC_step (lua_State *L);
247LUAI_FUNC void luaC_runtilstate (lua_State *L, int statesmask); 249LUAI_FUNC void luaC_runtilstate (lua_State *L, int state, int fast);
248LUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency); 250LUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency);
249LUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz); 251LUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz);
250LUAI_FUNC GCObject *luaC_newobjdt (lua_State *L, int tt, size_t sz, 252LUAI_FUNC GCObject *luaC_newobjdt (lua_State *L, int tt, size_t sz,