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 /testes | |
| 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 'testes')
| -rw-r--r-- | testes/gengc.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/testes/gengc.lua b/testes/gengc.lua index 3d4f67f8..d708d7fc 100644 --- a/testes/gengc.lua +++ b/testes/gengc.lua | |||
| @@ -162,9 +162,16 @@ end | |||
| 162 | assert(collectgarbage'isrunning') | 162 | assert(collectgarbage'isrunning') |
| 163 | 163 | ||
| 164 | 164 | ||
| 165 | do print"testing stop-the-world collection" | ||
| 166 | collectgarbage("incremental", nil, 0) | ||
| 165 | 167 | ||
| 166 | -- just to make sure | 168 | -- each step does a complete cycle |
| 167 | assert(collectgarbage'isrunning') | 169 | assert(collectgarbage("step")) |
| 170 | assert(collectgarbage("step")) | ||
| 171 | |||
| 172 | -- back to default value | ||
| 173 | collectgarbage("incremental", nil, 200) | ||
| 174 | end | ||
| 168 | 175 | ||
| 169 | collectgarbage(oldmode) | 176 | collectgarbage(oldmode) |
| 170 | 177 | ||
