android - GC_FOR_ALLOC 释放了 6346K,7% 空闲,暂停了 143 毫秒,总共 143 毫秒
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23508981/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
android - GC_FOR_ALLOC freed 6346K, 7% free , paused 143ms, total 143ms
提问by zIronManBox
I'm developing an offline mapView using OSMdroid Library. My tilesource loads the tiles but renders quit steadily. But the fact is in my log messages, I keep getting this error:
我正在使用 OSMdroid 库开发离线 mapView。我的 tilesource 加载了瓷砖,但呈现稳定退出。但事实是在我的日志消息中,我不断收到此错误:
GC_FOR_ALLOC freed 6346K, 7% free , paused 143ms, total 143ms
GC_FOR_ALLOC freed 6346K, 7% free , paused 143ms, total 143ms
I'm not sure how to debug this? Any ideas, do I have any memory leaks?
我不知道如何调试这个?任何想法,我有任何内存泄漏吗?
回答by gruszczy
This is not an error, but an information that Garbage collector has run.
这不是错误,而是垃圾收集器已运行的信息。
If you are seeing a lot of those, it might mean that you are making many allocations or have little memory. You should try to improve your program's memory performance.
如果您看到很多这些,则可能意味着您进行了多次分配或内存不足。您应该尝试提高程序的内存性能。
There is a good source information about investigating RAM consumption in Android:
关于调查 Android 中的 RAM 消耗,有一个很好的来源信息:
https://developer.android.com/tools/debugging/debugging-memory.html
https://developer.android.com/tools/debugging/debugging-memory.html
There is also a document about general strategies for managing your memory consumption in Android:
还有一个关于在 Android 中管理内存消耗的一般策略的文档: