Trim memory after initializing lib 68/71568/2
authorJunghoon Park <jh9216.park@samsung.com>
Thu, 26 May 2016 03:12:00 +0000 (12:12 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Thu, 26 May 2016 06:15:27 +0000 (23:15 -0700)
- result (common type)
 CODE     DATA     PEAK     PSS     3D      GEM(PSS)      SWAP      COMMAND
 6628     3052    10192     3332        0        0        0      /usr/bin/launchpad-loader <== before
 6628     2392    10204     2669        0        0        0      /usr/bin/launchpad-loader <== after

Change-Id: Id621669dddc691b1ba5bb12bbae07d86f1cda212
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
src/launchpad_loader.c

index f2ca7b0..17fc4bd 100644 (file)
@@ -21,6 +21,7 @@
 #include <sys/prctl.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include <malloc.h>
 #include <linux/limits.h>
 #include <Elementary.h>
 #include <bundle_internal.h>
@@ -107,6 +108,7 @@ static void __loader_create_cb(bundle *extra, int type, void *user_data)
                __init_theme();
                break;
        }
+       malloc_trim(0);
 }
 
 static int __loader_launch_cb(int argc, char **argv, const char *app_path,