New option "setparms" for 'collectgarbage'
The generational mode also uses the parameters for the incremental mode in its major collections, so it should be easy to change those parameters without having to change the GC mode.
This commit is contained in:
@@ -163,14 +163,15 @@ assert(collectgarbage'isrunning')
|
||||
|
||||
|
||||
do print"testing stop-the-world collection"
|
||||
collectgarbage("incremental", nil, 0)
|
||||
local step = collectgarbage("setparam", "stepsize", 0);
|
||||
collectgarbage("incremental")
|
||||
|
||||
-- each step does a complete cycle
|
||||
assert(collectgarbage("step"))
|
||||
assert(collectgarbage("step"))
|
||||
|
||||
-- back to default value
|
||||
collectgarbage("incremental", nil, 200)
|
||||
collectgarbage("setparam", "stepsize", step);
|
||||
end
|
||||
|
||||
collectgarbage(oldmode)
|
||||
|
||||
Reference in New Issue
Block a user