Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bdae1ad authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "frameworks/base: Increased Zygote preload GC threshold to half the heap...

Merge "frameworks/base: Increased Zygote preload GC threshold to half the heap size" into gingerbread
parents b7a2da61 ffec622c
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -64,7 +64,18 @@ public class ZygoteInit {
    private static final int LOG_BOOT_PROGRESS_PRELOAD_END = 3030;

    /** when preloading, GC after allocating this many bytes */
    private static final int PRELOAD_GC_THRESHOLD = 50000;

    /**
     * Setting the GC threshold to half the VM heap size to prevent
     * redundant GC which contributes to a higher boot time.
     * Taking the VM heap size from system property; assuming vm heap size
     * is in megabytes and thus ends with "m" - inline with rest of
     * the framework code.
     */
    private static final String heapSize =
                    SystemProperties.get("dalvik.vm.heapsize", "16m");
    private static final int PRELOAD_GC_THRESHOLD = Integer.parseInt(
                    heapSize.substring(0, heapSize.length()-1))*1024*1024/2;

    public static final String USAGE_STRING =
            " <\"true\"|\"false\" for startSystemServer>";