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

Commit acc1010d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Framework/base: Relocating GC calls at the end of loop during zygote init"

parents 3a739ad2 fbc95831
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -329,7 +329,6 @@ public class ZygoteInit {
                                Log.v(TAG,
                                    " GC at " + Debug.getGlobalAllocSize());
                            }
                            System.gc();
                            runtime.runFinalizationSync();
                            Debug.resetGlobalAllocSize();
                        }
@@ -349,7 +348,7 @@ public class ZygoteInit {
                        throw new RuntimeException(t);
                    }
                }

                System.gc();
                Log.i(TAG, "...preloaded " + count + " classes in "
                        + (SystemClock.uptimeMillis()-startTime) + "ms.");
            } catch (IOException e) {
@@ -421,7 +420,6 @@ public class ZygoteInit {
                if (false) {
                    Log.v(TAG, " GC at " + Debug.getGlobalAllocSize());
                }
                System.gc();
                runtime.runFinalizationSync();
                Debug.resetGlobalAllocSize();
            }
@@ -438,6 +436,7 @@ public class ZygoteInit {
                }
            }
        }
        System.gc();
        return N;
    }

@@ -449,7 +448,6 @@ public class ZygoteInit {
                if (false) {
                    Log.v(TAG, " GC at " + Debug.getGlobalAllocSize());
                }
                System.gc();
                runtime.runFinalizationSync();
                Debug.resetGlobalAllocSize();
            }
@@ -466,6 +464,7 @@ public class ZygoteInit {
                }
            }
        }
        System.gc();
        return N;
    }