[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: About the behavior of Lua incremental garbage collector
- From: "Yunhe Shi" <shiyunhe@...>
- Date: Thu, 31 Jul 2008 12:07:13 +0100
The following code seems to make the garbage collector unable to
finish the gc cycle. Can anyone give me some insights into this
problem.
--------------------------------------------------------------------
collectgarbage()
collectgarbage("stop")
print("free memory: ", collectgarbage("count"));
local step = 0
while not collectgarbage("step") do
step = step + 1
print("step: ", step, "free memory", collectgarbage("count"))
local x = {}
for i = 1, 1000 do
x[i] = {}
end
end
---------------------------------------------------------------------