最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Android Native Memory vs GPU Memory - Stack Overflow

programmeradmin1浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default -1

In 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.

发布评论

评论列表(0)

  1. 暂无评论