【发布时间】:2010-12-03 20:09:53
【问题描述】:
在 google 的 Android OS 日历应用中,您会在CalendarActivity 的 onCreate 方法中遇到这一行。
// Eliminate extra GCs during startup by setting the initial heap size to 4MB.
VMRuntime.getRuntime().setMinimumHeapSize(INITIAL_HEAP_SIZE)
谁能解释为什么将其设置为 4MB 会消除 GC?
【问题讨论】: