Questions regarding memory and profiling.

Hi,

  1. How can I get both texture memory and system memory that my app is consuming at any given time?

I know Storyboard gives us some info but I want to have them in run time so I can print them on the screen and see how they go (or leak) in runtime on actual devices.

  1. Is there any free profiling tools available for Corona?

Thanks.

  1. I cant recall who share this before and where. So i just reshare.

[lua]local monitorMem = function()

collectgarbage()

   print( "        MemUsage : " … collectgarbage(“count”) )
   local textMem = system.getInfo( “textureMemoryUsed” ) / 1000000

   print( "        TexMem      : " … textMem )

end

[/lua]

And you can call monitorMem() anywhere.
 

  1. I’ve read there is, but havent search about it. Have you find one?
  1. I cant recall who share this before and where. So i just reshare.

[lua]local monitorMem = function()

collectgarbage()

   print( "        MemUsage : " … collectgarbage(“count”) )
   local textMem = system.getInfo( “textureMemoryUsed” ) / 1000000

   print( "        TexMem      : " … textMem )

end

[/lua]

And you can call monitorMem() anywhere.
 

  1. I’ve read there is, but havent search about it. Have you find one?