当前位置: 代码迷 >> Android >> android中GC_FOR_MALLOC含意
  详细解决方案

android中GC_FOR_MALLOC含意

热度:39   发布时间:2016-05-01 10:10:38.0
android中GC_FOR_MALLOC含义

GC_FOR_MALLOC means that the GC was triggered because there wasn't enough memory left on the heap to perform an allocation. Might be triggered when new objects are being created.

在堆的内存不足以为一个新的对象分配空间时触发垃圾回收器以回收内存。

GC_EXPLICIT means that the garbage collector has been explicitly asked to collect, instead of being triggered by high water marks in the heap. Happens all over the place, but most likely when a thread is being killed or when a binder communication is taken down.

明确指定垃圾回收器进行内存回收时触发,可以在全局调用,不过通常情况下是在一个线程被杀死或者一个通信通道被关闭时使用。

There are a few others as well:

GC_CONCURRENT Triggered when the heap has reached a certain amount of objects to collect.

当堆中的对象达到一定数量时,触发回收。

GC_EXTERNAL_ALLOC means that the the VM is trying to reduce the amount of memory used for collectable objects, to make room for more non-collectable.

虚拟机尝试减少可回收对象所占用的内存,从未为不可回收对象提供更多空间

  相关解决方案