objective c - retrieve video ram usage iphone -


i have see article retrieve memory usage off iphone app programmatically-retrieve-memory-usage-on-iphone it's great !

in project want retrieve available vram free, because app load many textures, , must preload theses video ram fast rendering.

but on vm_statistics don't view theses properties : vm_statistics man page

thanks lot help.

as you've seen far, getting hard numbers gl texture memory usage quite difficult. it's complicated further fact coreanimation use gl texture memory without "consulting" you, including processes other yours.

practically speaking, suggest use vm tracker instrument in instruments watch changes in vm pages process maps under iokit tag. it's bit crude, it's best approach i've found. in experience, process largely guess , check.

you asked way determine amount of free vram, if info, it's not helpful. if app totally opengl , uses no uiviews or coreanimation layers other processes, importantly more privileged yours, can consume memory @ time, either explicitly or implicitly through coreanimation. it's safe assume if app prevents more-privileged apps getting texture memory need, process killed.

put differently, if ascertain instantaneous state of gl texture memory, couldn't count on being consumer of resource, it's pretty useless.

at end of day, should spend effort designing app citizen in terms of gl memory , manage (read: minimize) own consumption of texture memory. ios devices not old-school game consoles -- not thing running -- need mindful , tolerant of fact, lest app 1 of has reboot phone every few minutes in order use it.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -