Commit c82a46c1 authored by vvb2060's avatar vvb2060 Committed by John Wu

Check property before switch mem cgroup

parent 666ab194
......@@ -308,9 +308,11 @@ static void daemon_entry() {
// Escape from cgroup
int pid = getpid();
switch_cgroup("/acct", pid);
switch_cgroup("/dev/memcg/apps", pid);
switch_cgroup("/dev/cg2_bpf", pid);
switch_cgroup("/sys/fs/cgroup", pid);
if (getprop("ro.config.per_app_memcg") != "false") {
switch_cgroup("/dev/memcg/apps", pid);
}
// Get self stat
char buf[64];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment