proc-oom-priority: Support fixed oom for service type app 58/301558/3
authorUnsung Lee <unsung.lee@samsung.com>
Fri, 17 Nov 2023 06:17:10 +0000 (15:17 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Tue, 21 Nov 2023 07:56:06 +0000 (16:56 +0900)
Change-Id: Ia8c3dfa1f973f44948f6b11cc9a223302505b951
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/process/proc-oom-priority.c

index 1391d8a..ee511ba 100644 (file)
@@ -135,6 +135,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;
 }
@@ -144,6 +145,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;
 }