Android's Garbage Collector appear when trying to render 3D model with Opengl ES20

三世轮回 提交于 2019-12-12 03:35:04

问题


My app renders 3D models via opengl ES2, once at a time. When I enable textures in those model my app crashes. First, I thought that was because the texture images are large, but the truth is that they are not. For instance, in one of the models, I use four .png images of sizes 4kb, 38kb, 39kb, and 200kb respectively. Are they large? I don't think so, but reading the logcat it seems that everything comes from a memory problem:

08-26 02:08:13.574: I/art(10870): Background sticky concurrent mark sweep GC freed 1557(49KB) AllocSpace objects, 22(8MB) LOS objects, 35% free, 13MB/21MB, paused 311us total 112.465ms

I am new on this and this message unfortunately doesn't say anything to me. Reading out there it seems that the Garbage Collector decided to appear, but I don't know the reason. Somebody can tell me what could be the issue, or give me some hint about how to attack this kind of situation?

Thank you in advance,

JM

PS: I am using a Nexus 5x and Samsung Galaxy TAB A as testing's devices

来源:https://stackoverflow.com/questions/39156645/androids-garbage-collector-appear-when-trying-to-render-3d-model-with-opengl-es

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!