We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lua code:
function Sleep(n) os.execute("sleep " .. n) end function Test() local a = {} for i=1, 10000 do local b = {} for j=1, 10000 do b[j] = j end a[i]= b end Sleep(5) print(#a) end Test() Sleep(2) collectgarbage("collect") Sleep(1200) print("sleep end")
compare memory usage of glua and lua5.1 glua test.lua glua 0.0 00:21.51 12 0 21 4857M
glua's memory usage is always 4857M
lua5.1 test.lua lua-5.1 0.0 00:03.53 1 0 10 2504M lua-5.1 0.0 00:03.70 1 0 10 7408K
lua5.1's memory usage from 2504M down to 7408K
The local variables's memory should released by gc after the function return.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
lua code:
compare memory usage of glua and lua5.1
glua test.lua
glua 0.0 00:21.51 12 0 21 4857M
glua's memory usage is always 4857M
lua5.1 test.lua
lua-5.1 0.0 00:03.53 1 0 10 2504M
lua-5.1 0.0 00:03.70 1 0 10 7408K
lua5.1's memory usage from 2504M down to 7408K
The local variables's memory should released by gc after the function return.
The text was updated successfully, but these errors were encountered: