Merge "Switch to purge all unused memory to kernel." am: 2325b1da98 am: 861aa1f9d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2461533 Change-Id: I5ce9c3c59259dac9b5734d7570cb9fa359ec1d1e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
committed by
Automerger Merge Worker
commit
2a2807c65a
@@ -2296,7 +2296,9 @@ pid_t zygote::ForkCommon(JNIEnv* env, bool is_system_server,
|
|||||||
// region shared with the child process we reduce the number of pages that
|
// region shared with the child process we reduce the number of pages that
|
||||||
// transition to the private-dirty state when malloc adjusts the meta-data
|
// transition to the private-dirty state when malloc adjusts the meta-data
|
||||||
// on each of the pages it is managing after the fork.
|
// on each of the pages it is managing after the fork.
|
||||||
mallopt(M_PURGE, 0);
|
if (mallopt(M_PURGE_ALL, 0) != 1) {
|
||||||
|
mallopt(M_PURGE, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pid_t pid = fork();
|
pid_t pid = fork();
|
||||||
|
|||||||
Reference in New Issue
Block a user