diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2021-08-12 07:53:17 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2021-08-12 07:53:17 +0900 |
commit | 170d086362136a6145bac003a6ae9cc14c6302f1 (patch) | |
tree | 2b264e143e872fcd363c3ccbc8eef821781c62e2 | |
parent | eb5ef5d6cb4bff366f1f24be32174d932a27fb96 (diff) | |
download | launchpad-170d086362136a6145bac003a6ae9cc14c6302f1.tar.gz launchpad-170d086362136a6145bac003a6ae9cc14c6302f1.tar.bz2 launchpad-170d086362136a6145bac003a6ae9cc14c6302f1.zip |
Fix memory monitor function
If the threshold is 100, the memory_monitor_is_low_memory() function
always returns false. The value of the threshold that is 100 means the
feature is disabled.
Change-Id: I5c72297ca11dfa3d70c39c412a5bee1bc3f76790
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | src/launchpad-process-pool/src/launchpad_memory_monitor.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/launchpad-process-pool/src/launchpad_memory_monitor.c b/src/launchpad-process-pool/src/launchpad_memory_monitor.c index 7bd3d4a..d4d4b2d 100644 --- a/src/launchpad-process-pool/src/launchpad_memory_monitor.c +++ b/src/launchpad-process-pool/src/launchpad_memory_monitor.c @@ -96,6 +96,9 @@ bool _memory_monitor_is_low_memory(void) { unsigned int mem_used_ratio = 0; + if (__monitor.threshold == 100) + return false; + _proc_get_mem_used_ratio(&mem_used_ratio); _W("previous used ratio(%u), current used ratio(%u)", |