diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-10-23 17:15:06 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-10-23 17:15:06 -0300 |
| commit | 5ffcd458f001fce02e5f20a6130e145c6a3caf53 (patch) | |
| tree | 4e4ae6f2c0be73beb037c6f6e1c4931dc76418c5 /lgc.c | |
| parent | 9b01da97e3a8f2df9acbd3b86af50e4040e9d914 (diff) | |
| download | lua-5ffcd458f001fce02e5f20a6130e145c6a3caf53.tar.gz lua-5ffcd458f001fce02e5f20a6130e145c6a3caf53.tar.bz2 lua-5ffcd458f001fce02e5f20a6130e145c6a3caf53.zip | |
Some changes in default GC parameters
Diffstat (limited to 'lgc.c')
| -rw-r--r-- | lgc.c | 4 |
1 files changed, 1 insertions, 3 deletions
| @@ -1675,7 +1675,7 @@ void luaC_runtilstate (lua_State *L, int state, int fast) { | |||
| 1675 | */ | 1675 | */ |
| 1676 | static void incstep (lua_State *L, global_State *g) { | 1676 | static void incstep (lua_State *L, global_State *g) { |
| 1677 | l_mem stepsize = applygcparam(g, STEPSIZE, 100); | 1677 | l_mem stepsize = applygcparam(g, STEPSIZE, 100); |
| 1678 | l_mem work2do = applygcparam(g, STEPMUL, stepsize); | 1678 | l_mem work2do = applygcparam(g, STEPMUL, stepsize / cast_int(sizeof(void*))); |
| 1679 | l_mem stres; | 1679 | l_mem stres; |
| 1680 | int fast = (work2do == 0); /* special case: do a full collection */ | 1680 | int fast = (work2do == 0); /* special case: do a full collection */ |
| 1681 | do { /* repeat until enough work */ | 1681 | do { /* repeat until enough work */ |
| @@ -1739,8 +1739,6 @@ static void fullinc (lua_State *L, global_State *g) { | |||
| 1739 | /* finish any pending sweep phase to start a new cycle */ | 1739 | /* finish any pending sweep phase to start a new cycle */ |
| 1740 | luaC_runtilstate(L, GCSpause, 1); | 1740 | luaC_runtilstate(L, GCSpause, 1); |
| 1741 | luaC_runtilstate(L, GCScallfin, 1); /* run up to finalizers */ | 1741 | luaC_runtilstate(L, GCScallfin, 1); /* run up to finalizers */ |
| 1742 | /* 'marked' must be correct after a full GC cycle */ | ||
| 1743 | /* lua_assert(g->GCmarked == gettotalobjs(g)); ??? */ | ||
| 1744 | luaC_runtilstate(L, GCSpause, 1); /* finish collection */ | 1742 | luaC_runtilstate(L, GCSpause, 1); /* finish collection */ |
| 1745 | setpause(g); | 1743 | setpause(g); |
| 1746 | } | 1744 | } |
