proc-oom-priority: Support fixed oom for service type app 52/302752/3
authorUnsung Lee <unsung.lee@samsung.com>
Fri, 17 Nov 2023 06:17:10 +0000 (15:17 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Thu, 28 Dec 2023 09:30:01 +0000 (18:30 +0900)
Change-Id: Ia8c3dfa1f973f44948f6b11cc9a223302505b951
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/process/proc-oom-priority.c

index 20ac0a6..efa1443 100644 (file)
@@ -181,6 +181,7 @@ static int proc_oom_priority_init(void *data)
        load_fixed_oom_config();
 
        register_notifier(RESOURCED_NOTIFIER_APP_LAUNCH, proc_oom_priority_set_fixed_oom);
+       register_notifier(RESOURCED_NOTIFIER_SERVICE_LAUNCH, proc_oom_priority_set_fixed_oom);
        register_notifier(RESOURCED_NOTIFIER_APP_TERMINATED, proc_oom_priority_remove_pid);
        return RESOURCED_ERROR_NONE;
 }
@@ -190,6 +191,7 @@ static int proc_oom_priority_exit(void *data)
        if (oom_fixed_pid_list)
                g_hash_table_destroy(oom_fixed_pid_list);
        unregister_notifier(RESOURCED_NOTIFIER_APP_LAUNCH, proc_oom_priority_set_fixed_oom);
+       unregister_notifier(RESOURCED_NOTIFIER_SERVICE_LAUNCH, proc_oom_priority_set_fixed_oom);
        unregister_notifier(RESOURCED_NOTIFIER_APP_TERMINATED, proc_oom_priority_remove_pid);
        return RESOURCED_ERROR_NONE;
 }