简体   繁体   English

我的应用程序在我的设备上占用250mb内存。 当我进行堆转储并进行分析时。 它说堆大小约为7mb

[英]My App is taking 250mb memory on my device. When I do a heap dump and analyze it. it says the heap size around 7mb

Is there another memory which is being used that doesn't show on a heap dump? 是否有另一个正在使用的内存未在堆转储中显示? I am using Memory Analyzer on Eclipse. 我在Eclipse上使用Memory Analyzer。 First I dump the heap with DDMS and Memory Analyzer picks. 首先,我使用DDMS和Memory Analyzer选择转储堆。 it only shows that the size of the heap is 7mb and the histogram is basically telling me everything is fine. 它只显示堆的大小是7mb,直方图基本上告诉我一切都很好。 However, I have downloaded several memory monitoring apps on my device and they all say my app is taking 250mb and it keeps climbing. 但是,我已经在我的设备上下载了几个内存监控应用程序,他们都说我的应用程序占用250mb并且它一直在攀爬。

How else can I try to find out why its taking so much memory? 我怎么能试着找出为什么它会占用这么多记忆呢?

在此输入图像描述

在此输入图像描述

Memory measuring apps are not worth very much, as, to quote Dianne Hackborn : 内存测量应用程序并不值得,因为引用Dianne Hackborn

Note that memory usage on modern operating systems like Linux is an extremely complicated and difficult to understand area. 请注意,像Linux这样的现代操作系统上的内存使用是一个非常复杂且难以理解的领域。 In fact the chances of you actually correctly interpreting whatever numbers you get is extremely low. 事实上,你实际正确地解释你得到的任何数字的可能性非常低。

That being said, you are welcome to use the techniques outlined in her answer to try to get a better handle on what those tools are claiming and whether it is really a problem. 话虽如此,欢迎您使用她的答案中概述的技术,试图更好地处理这些工具声称的内容以及它是否真的是一个问题。

Also: 也:

  • If you have more than one process, bear in mind that DDMS' heap dump is for a single process 如果您有多个进程,请记住DDMS的堆转储是针对单个进程的

  • If you are doing native development using the NDK, NDK allocations are not part of the managed heap and therefore are not included in the heap dump 如果使用NDK进行本机开发,则NDK分配不是托管堆的一部分,因此不包含在堆转储中

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JMAP转储大小为4.5 GB。 Eclipse MAT显示的总堆为415 MB,我如何分析剩余的转储? - JMAP dump size is 4.5 GB. Eclipse MAT is showing total heap of 415 MB, how do i analyze the remaining dump? 为什么我在Solr上执行的每个查询都填充了10s MB的堆内存? - Why does every query I do on Solr fill my heap memory of 10s of MB? Clojure AWS Lambda Function目标中的OpenCV大于250MB,如何减小它的大小? - OpenCV in Clojure AWS Lambda Function target is larger than 250MB, how do I reduce it's size? 当我加载大约40mb大小的11k图像时,为什么会出现java堆空间异常 - Why do I get a java heap space exception when I load around 11k images with a size of around 40mb 我的Android应用程序与巨大的MS Access数据库的Ucanaccess连接在Android设备上占用了太多的堆空间。 任何替代品? - Ucanaccess connection of my Android app with a huge MS Access database is taking too much heap space on Android device. Any alternatives? 为什么我转储的hprof文件仅显示总堆9.6MB而实际堆大小为75MB - Why my dumped hprof file show total heap only 9.6MB while the actually heap size is 75MB 如何在 IntelliJ 中分析堆转储? (内存泄漏) - How can I analyze a heap dump in IntelliJ? (memory leak) 我的Mac没有采用我的堆大小配置 - My Mac is not taking my Heap Size configurations eclipse 内存分析器看到整个堆转储 (8GB) 的一小部分 (363,2MB) - eclipse memory analyzer sees small part (363,2MB) of entire heap dump (8GB) 如何在android上检查我的app堆内存大小? - How to check my app heap memory size on android?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM