I've been spending the afternoon starring at Xcode Instruments memory monitor trying to decipher the following memory issue.
I have a fullscreen OpenGL ES2 app running on iPad. I am fanatical about memory issues so my retains/releases are all nicely balanced. I closely monitor memory leaks. My app is basically squeeky clean.
Except occassionally when I reorient the device. Portrait to Landscape. Back and forth I rock the device stress testing my discarding and rebuilding of the OpenGL framebuffer. The ambient memory footprint of my app is about 70MB Real Mems and 180MB Virtual Mems. Real memory hardly varies at all during device rotations. However the virtual mems reading sometimes briefly spikes up to 250MB and then recedes back to 180MB. No real pattern. But clearly related discarding/rebuilding the framebuffer.
I see random memory warnings in my NSlogs but the app just hums along, no worries.
1) Since iPhone OS devices don't have VM could someone explain to me what the VM reading actually means?
2) My app totally leak free and generally bulletproof dispite the VM spikes. Never crashes. Rock solid. Should I be concerned about this?
3) There is clearly something happening in OpenGL framebuffer land that is causing this but I am using the API in the proper way:
paraphrasing:
Discarding the framebuffer:
glDeleteRenderbuffers(1, &m_colorbuffer);
glDeleteFramebuffers(1, &m_framebuffer);
Rebuilding the framebuffer:
glGenFramebuffers(1, &m_framebuffer);
glGenRenderbuffers(1, &m_colorbuffer);
Is there some other memory flushing trick I have missed?
Thanks for any insight.
Cheers,
Doug