My machine is mac mini(2011) osx10.7.4
first of all. I download the lua-5.2.2 from lua.org, unzip it, and
$ make macosx
$ make install
then i run it
$ lua
Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio
>
The memory usage now is 816KB (from Activity Monitor)
And then I type code below for malloc...
a = {}
for i = 1, 999999 do
a[i] = {}
end
The memory usage growth to 79.0MB
And then I type code below for dealloc...
a = nil
collectgarbage("collect")
The memory usage down to 25.0MB
Ok. Here is my question.
Why there are 25MB left?
How to release or recycle them?