等待并发GC阻塞 [英] Wait for concurrent GC blocked

查看:136
本文介绍了等待并发GC阻塞的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在模拟器上运行我的应用程序时,Logcat显示:

When I run my application on emulator the Logcat is showing this:

04-22 16:21:30.685: D/dalvikvm(967): GC_CONCURRENT freed 1545K, 20% free 7019K/8720K, paused 78ms+17ms, total 360ms

04-22 16:21:30.685: D/dalvikvm(967): WAIT_FOR_CONCURRENT_GC blocked 143ms
04-22 16:21:31.845: D/dalvikvm(967): GC_CONCURRENT freed 1552K, 20% free 7019K/8720K, paused 116ms+18ms, total 554ms

04-22 16:21:31.845: D/dalvikvm(967): WAIT_FOR_CONCURRENT_GC blocked 268ms
04-22 16:21:32.435: D/dalvikvm(967): GC_CONCURRENT freed 1545K, 20% free 7019K/8720K, paused 75ms+9ms, total 192ms

04-22 16:21:32.435: D/dalvikvm(967): WAIT_FOR_CONCURRENT_GC blocked 73ms
04-22 16:21:32.945: D/dalvikvm(967): GC_CONCURRENT freed 1552K, 20% free 7019K/8720K, paused 75ms+10ms, total 209ms

04-22 16:21:32.945: D/dalvikvm(967): WAIT_FOR_CONCURRENT_GC blocked 70ms
04-22 16:21:33.434: D/dalvikvm(967): GC_CONCURRENT freed 1545K, 20% free 7019K/8720K, paused 78ms+12ms, total 192ms

这样一直持续到我退出应用程序。谢谢

and this continues until I exit the application.Any suggestion?Thanks

推荐答案

似乎你正在创建许多新对象,很快就把它们抛出去。

Seems like you're creating many new objects and throw them away soon.

对于WAIT_FOR_CONCURRENT_GC,请参阅以下内容:
WAIT_FOR_CONCURRENT_GC阻止的意思是什么?

For WAIT_FOR_CONCURRENT_GC see this one: what does WAIT_FOR_CONCURRENT_GC blocked mean?

这意味着你尝试分配内存(例如对象创建)不适合记忆这是GC_CONCURRENT释放的原因。它只是通常的垃圾回收。

It means you try to allocate memory (for example object creation) and it doesn't fit into memory. Thats what GC_CONCURRENT freed is caused by. Its just usual garbage collection.

如果您遇到性能问题,请尝试重新使用对象或备用。

If you've got performance problems, try to reuse objects or spare them.

这篇关于等待并发GC阻塞的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆