diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-01-16 17:02:55 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-01-16 17:02:55 -0300 |
commit | 4a8e48086433ad12f2991c07f3064278714fd0f1 (patch) | |
tree | 7efc32733ceff1ce51930d927292e7b7ce56b175 /testes/gengc.lua | |
parent | 17e0c29d9b435392016b707309ed51409b0aea12 (diff) | |
download | lua-4a8e48086433ad12f2991c07f3064278714fd0f1.tar.gz lua-4a8e48086433ad12f2991c07f3064278714fd0f1.tar.bz2 lua-4a8e48086433ad12f2991c07f3064278714fd0f1.zip |
New mechanism to query GC parameters
Diffstat (limited to '')
-rw-r--r-- | testes/gengc.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/testes/gengc.lua b/testes/gengc.lua index 51872cc1..c4f6ca1b 100644 --- a/testes/gengc.lua +++ b/testes/gengc.lua | |||
@@ -163,15 +163,17 @@ assert(collectgarbage'isrunning') | |||
163 | 163 | ||
164 | 164 | ||
165 | do print"testing stop-the-world collection" | 165 | do print"testing stop-the-world collection" |
166 | local step = collectgarbage("setparam", "stepsize", 0); | 166 | local step = collectgarbage("param", "stepsize", 0); |
167 | collectgarbage("incremental") | 167 | collectgarbage("incremental") |
168 | assert(collectgarbage("param", "stepsize") == 0) | ||
168 | 169 | ||
169 | -- each step does a complete cycle | 170 | -- each step does a complete cycle |
170 | assert(collectgarbage("step")) | 171 | assert(collectgarbage("step")) |
171 | assert(collectgarbage("step")) | 172 | assert(collectgarbage("step")) |
172 | 173 | ||
173 | -- back to default value | 174 | -- back to default value |
174 | collectgarbage("setparam", "stepsize", step); | 175 | collectgarbage("param", "stepsize", step); |
176 | assert(collectgarbage("param", "stepsize") == step) | ||
175 | end | 177 | end |
176 | 178 | ||
177 | collectgarbage(oldmode) | 179 | collectgarbage(oldmode) |