admin管理员组文章数量:1313175
I am doing memory analytis for my application, using dumpsys and below command adb shell dumpsys meminfo I get the dalvik heap and native heap memory .....but I also see GPU memory adb shell dumpsys gfxinfo I am failing to understand when is GPU memory used and when is native memory used for bitmaps.Also the texture view, surface view is used where?
More clarity needed in analysis.
I am doing memory analytis for my application, using dumpsys and below command adb shell dumpsys meminfo I get the dalvik heap and native heap memory .....but I also see GPU memory adb shell dumpsys gfxinfo I am failing to understand when is GPU memory used and when is native memory used for bitmaps.Also the texture view, surface view is used where?
More clarity needed in analysis.
Share Improve this question asked Jan 31 at 4:04 pritesh tiwarypritesh tiwary 1 1- Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Bot Commented Jan 31 at 6:54
1 Answer
Reset to default -1In Android memory analysis, adb shell dumpsys meminfo shows Dalvik Heap (Java/Kotlin objects, software-rendered Bitmaps) and Native Heap (C/C++ allocations, hardware-accelerated Bitmaps). When hardware acceleration is enabled (setHardwareAccelerated(true)), Bitmaps are stored in Native Heap instead of Dalvik:
bitmap.setConfig(Bitmap.Config.HARDWARE)
GPU memory, analyzed via adb shell dumpsys gfxinfo, is used when rendering with OpenGL/SurfaceFlinger, storing textures and shaders. TextureView relies on the GPU for smooth animations, whereas SurfaceView provides a separate rendering surface, making it efficient for media playback. Identifying where Bitmaps are stored helps optimize memory usage and prevent OOM(Out of Memory) errors.
本文标签: Android Native Memory vs GPU MemoryStack Overflow
版权声明:本文标题:Android Native Memory vs GPU Memory - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741926979a2405347.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论