Change function
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 16 Mar 2021 10:34:55 +0000 (19:34 +0900)
committer연정현/Tizen Platform Lab(SR)/Staff Engineer/삼성전자 <jungh.yeon@samsung.com>
Wed, 17 Mar 2021 00:49:21 +0000 (09:49 +0900)
Document saids this is more efficient for memory management
if user doesn't require exact time matching.

Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/server/worker_thread.cc

index b2d1df9..dc15821 100644 (file)
@@ -149,7 +149,8 @@ void WorkerThread::SetMemoryTrimTimer() {
   if (timer > 0)
     g_source_remove(timer);
 
-  timer = g_timeout_add(3000, TrimMemory, &timer);
+  timer = g_timeout_add_seconds_full(G_PRIORITY_LOW, 3,
+      TrimMemory, &timer, NULL);
 }
 
 gboolean WorkerThread::TrimMemory(void* data) {