Set the mmap and trim threshold of 64-bit 59/266959/1 accepted/tizen/6.0/unified/20211124.061641 submit/tizen_6.0/20211123.055129
authorYOUNGHUN KIM <yh8004.kim@samsung.com>
Tue, 2 Nov 2021 10:54:58 +0000 (19:54 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Tue, 23 Nov 2021 05:44:58 +0000 (14:44 +0900)
Change-Id: I60b4f983f30a9735477d458da9bb37ba4c4292d0

packaging/mused.spec
server/src/muse_server_private.c

index 1ae18cd0a72af4e5896a7e70e2d0d98bd9aca831..50e697939cfdb377806c585c48f82d1fed37489d 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mused
 Summary:    A multimedia daemon
-Version:    0.3.135
+Version:    0.3.136
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index b1b7c97ad11c9f59874c305f16fa9b7ca2a8518e..1cb23b572dcba809d334352cac69620f1dcc9147 100644 (file)
 #include <sys/syscall.h>
 #include <gst/gst.h>
 #include <syslog.h>
+#include <malloc.h>
 #include <tzplatform_config.h>
 
 #if !GLIB_CHECK_VERSION(2, 58, 0)
 #define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
 #endif
 
+#if defined (__aarch64__) || defined (__x86_64__)
+#define MUSE_DEFAULT_MMAP_THRESHOLD_MAX (512 * 1024)
+#endif
+
+
 #ifdef MUSE_REGISTER_VIP
 #include <proc_stat.h>
 #endif
@@ -599,6 +605,11 @@ static void _ms_init(void)
 
        LOGD("Enter");
 
+#if defined (__aarch64__) || defined (__x86_64__)
+       mallopt(M_MMAP_THRESHOLD, MUSE_DEFAULT_MMAP_THRESHOLD_MAX);
+       mallopt(M_TRIM_THRESHOLD, 2 * MUSE_DEFAULT_MMAP_THRESHOLD_MAX);
+#endif
+
        muse_server->system = g_new0(ms_system_t, 1);
        ms_system_init(muse_server->system);