本文介绍了Android的垃圾收集器技术细节的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我做的共性研究/各种移动平台的差异,正在调查的问题之一是内存管理。因此,我很感兴趣,对各种机制的更详细的技术信息。

As I'm doing a research on commonalities/differences of various mobile platforms, one of the aspects under investigation is memory management. As such, I'm interested in more detailed technical information on the various mechanisms.

在具体,例如这垃圾收集器类型确实的Andr​​oid使用

From Android 5.0 (Lollipop) and on, Dalvik was replaced with the Android Runtime (ART).

谷歌有以下要说的变化,Dalvik的垃圾收集器ART :

Google has the following to say about the changes in the garbage collector from Dalvik to ART :

垃圾回收(GC)可以影响一个应用程序的性能,从而在  波涛汹涌显示,可怜的UI响应,和其他问题。艺术  提高垃圾收集在几个方面:

      
  • 在一个GC暂停,而不是两个
  •   
  • 剩余的GC暂停期间并行化处理
  •   
  • 集电极与较低的总的GC时间清理最新分配,短期对象的特殊情况下
  •   
  • 改进垃圾收集的人体工程学设计,使得并发垃圾收集更及时,这使得GC_FOR_ALLOC事件极  罕见的典型应用案例  压缩GC降低背景内存使用和碎片
  •   
  • One GC pause instead of two
  • Parallelized processing during the remaining GC pause
  • Collector with lower total GC time for the special case of cleaning up recently-allocated, short-lived objects
  • Improved garbage collection ergonomics, making concurrent garbage collections more timely, which makes GC_FOR_ALLOC events extremely rare in typical use cases Compacting GC to reduce background memory usage and fragmentation

另请参阅:

这篇关于Android的垃圾收集器技术细节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!