adb: use oom_score_adj instead of oom_adj

Change-Id: I76c6ce83d7d400c8b84bfece5d30189640cb2505
This commit is contained in:
Rom Lemarchand 2014-06-20 16:30:54 -07:00
parent 4c3d9be594
commit 07ce7cab72
1 changed files with 3 additions and 3 deletions

View File

@ -189,13 +189,13 @@ static void init_subproc_child()
{
setsid();
// Set OOM adjustment to prevent killing
int fd = adb_open("/proc/self/oom_adj", O_WRONLY);
// Set OOM score adjustment to prevent killing
int fd = adb_open("/proc/self/oom_score_adj", O_WRONLY);
if (fd >= 0) {
adb_write(fd, "0", 1);
adb_close(fd);
} else {
D("adb: unable to update oom_adj\n");
D("adb: unable to update oom_score_adj\n");
}
}