It was a function that repeated every x seconds and showed memory usage.
I must of rewrote the file it was in
[import]uid: 79135 topic_id: 15203 reply_id: 315203[/import]
Made:
[lua]function checkmem()
collectgarbage()
print( "\nMemUsage: " … collectgarbage(“count”) )
timer.performWithDelay(1000, checkmem)
end
checkmem()[/lua]
it isn’t the same, but it’ll do for now [import]uid: 79135 topic_id: 15203 reply_id: 56199[/import]
[lua]local function monitorMem(event)
collectgarbage(“collect”)
print( “\nMemUsage: " … (collectgarbage(“count”)/1000) … " MB”)
print("Texture Usage " … system.getInfo( “textureMemoryUsed” ) / 1000000)
return true
end
Runtime:addEventListener(“enterFrame”, monitorMem)[/lua]
That prints it in MB and might have been the one you were using 
(If you’re prefer it every X seconds instead, change it from a Runtime listener to a timer.performWithDely() :))
Peach [import]uid: 52491 topic_id: 15203 reply_id: 56254[/import]
Yes! That is the one I had, thanks [import]uid: 79135 topic_id: 15203 reply_id: 56263[/import]
No worries; I’m happy I could help you find it again
[import]uid: 52491 topic_id: 15203 reply_id: 56359[/import]
The following will print the memory usage only if it has changed. This way is friendlier with the terminal window:
[lua]local lastCheck = {sysMem = 0, textMem = 0}
Runtime:addEventListener(‘enterFrame’, function()
– watch for leaks
collectgarbage()
local sysMem = collectgarbage(“count”) * 0.001
local textMem = system.getInfo( “textureMemoryUsed” )*0.000001
if lastCheck.sysMem ~= sysMem or lastCheck.textMem ~= textMem then
lastCheck.sysMem = sysMem
lastCheck.textMem = textMem
print ("mem: " … math.floor(sysMem*1000)*0.001 … "MB \t " … math.floor(textMem*1000)*0.001 … “MB”)
end
end) [import]uid: 9546 topic_id: 15203 reply_id: 56393[/import]
Thanks, that is great
[import]uid: 79135 topic_id: 15203 reply_id: 56394[/import]
Hi
Please tell me how high texture memory can go ?
My average result is :
mem: 0.451MB 20.267MB
mem: 0.454MB 20.267MB
mem: 0.455MB 20.267MB
mem: 0.454MB 20.267MB
mem: 0.451MB 20.267MB
mem: 0.454MB 20.267MB
mem: 0.454MB 20.267MB
mem: 0.454MB 20.267MB
Game for iPad …
Is it ok ? [import]uid: 13156 topic_id: 15203 reply_id: 57116[/import]
I’d have to get back to you on hard limits but from what I’ve read anything 24MB or under for Texture Memory on the iPad should be perfect. (I believe it can go quite a lot higher without issues, but I recall a thread discussing this where 24 or below was considered ideal.)
Peach
[import]uid: 52491 topic_id: 15203 reply_id: 57235[/import]