GC中遇到的问题(字节技术)
来源:互联网 发布:大腕精神病预言 知乎 编辑:程序博客网 时间:2024/05/21 18:40
问题 (Question)
I have been getting this error since last three days, I did a lot of search but I dint find any useful answer, (some people say that it is bcoz of null referencing but I am no where referencing null) I am getting this error when I am trying to write the inputstream of an image file into the byte array, any help will be appreciated
Logcat show like this:
GC_FOR_ALLOC freed 5178K, 21% free 45743K/57384K, paused 49ms, total 50msGrow heap (frag case) to 68.666MB for 22220109-byte allocationGC_CONCURRENT freed 41K, 15% free 67405K/79084K, paused 3ms+11ms, total 60msFatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 21864 (GC)
我一直以来的三天,最后得到这个错误,我做了很多搜索但我力找到有用的答案,(有人说它是空引用,但我没有引用无效)我得到这个错误的时候,我想写的图像文件的输入流到字节阵列,任何帮助将不胜感激
LogCat这样的节目:
GC_FOR_ALLOC freed 5178K, 21% free 45743K/57384K, paused 49ms, total 50msGrow heap (frag case) to 68.666MB for 22220109-byte allocationGC_CONCURRENT freed 41K, 15% free 67405K/79084K, paused 3ms+11ms, total 60msFatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 21864 (GC)
最佳答案 (Best Answer)
GC_FOR_ALLOC
means there were not enough free memory to fulfill an allocation request, so a garbage collection was necessary, whereas GC_CONCURRENT
just means that the GC felt like running, typically because the amount of free memory became lower than a certain threshold after an allocation.
You can try to analyze memory for your Android application:
http://developer.android.com/tools/help/traceview.html
http://android-developers.blogspot.se/2011/03/memory-analysis-for-android.html
Check your app for memleaks
GC_FOR_ALLOC
意味着没有足够的可用内存来满足分配请求,所以垃圾收集是必要的,而GC_CONCURRENT
只是意味着GC感觉运行,通常是因为在分配可用内存低于某一阈值的了。
你可以试着分析你的Android应用程序的内存:
http://developer.android.com/tools/help/traceview.html
http://android-developers.blogspot.se/2011/03/memory-analysis-for-android.html
检查你的应用程序memleaks
- GC中遇到的问题(字节技术)
- 开发中遇到字节对齐的问题
- 利用字节码解决java中遇到的问题
- 网络传输中遇到的字节序问题
- NDK开发中遇到的字节对齐问题
- 利用字节码解决java中遇到的问题
- 最近工作中遇到的技术问题
- 工作中遇到的技术问题 记录
- 项目中遇到的问题及技术
- 工作中遇到的技术问题
- 信息比赛中遇到的技术问题集。。。
- Touch001项目实现过程中遇到的一个技术问题
- WEB平台对接过程中遇到的系列技术问题
- 开始记录工作中遇到的一些技术问题
- 开发过程中遇到的问题(非技术)
- 支付宝技术集成过程中遇到的问题记录
- 2015年创业中遇到的技术问题:11-20
- 2015年创业中遇到的技术问题:21-30
- 头指针与头结点
- TCP、UDP、IP 协议分析
- App Transport Security has blocked a cleartext HTTP 错误
- wait waitpid函数使用
- [HDU1260]-Tickets
- GC中遇到的问题(字节技术)
- fragment 创建菜单注意事项
- qt: exec()的用法,accept()和accepted的概念
- 微信支付页面不显示以及空白页error -1
- svn检出数据无法验证问题解决方法
- windows编程经典书籍
- Emergency Call 分析
- Ubuntu安装到跑起Tomcat全套教程
- Java多线程Synchronized心得