3
\$\begingroup\$

My team is running into an issue where the amount of texture memory allocated via the glTexImage2D is high enough that it crashes the app ( at about 400 MB for iPhone 5). We're taking steps to minimize the texture allocation ( via compression, using fewer bits/channel and doing procedural shaders for VFX etc).

Since the app crashed on glTexImage2D, I felt like, it's running out of texture memory (as against virtual memory). Is there any documentation/guideline on the recommended texture memory usage by an app (not just optimize your texture memory) .

AFAIK on iOS devices ( and many Android devices) there's no dedicated VRAM and our app process is still well within the virtual memory limit. Is this some how related to the size of physical RAM ? My searches so far has resulted only in info on max texture size and tricks for optimizing texture usage and such. Any information is appreciated.

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

On iOS it seems that you are asking for trouble when the total memory usage for your app starts approaching half of the device's total memory (1gb for iPhone 5). But there's not a completely hard limit and it's not totally predictable. We have noticed that you get more leeway after a reboot of the device, for example. Anecdotally it seems that if your app has been ejected by the OS for using too much memory, it can be extra sensitive about ejecting you in the future (until reboot).

\$\endgroup\$
1
  • \$\begingroup\$ Thanks a lot. I'll try to enforce the half-device memory limitation as a guideline for now. \$\endgroup\$
    – Arun R
    Commented Sep 17, 2014 at 15:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .