memory profiling for C program
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Need to do a memory profiling of my C application .. It should include footprint size and a RAM size ... for example if my application is like below .. #include <stdio.h> int global = 10; /* initialized global variable */ int test_code(void) { static int i = 100; /* Initialized static variable*/ return 0; } Output: [putta@linux]$ gcc memory-layout.c -c memory-layout [putta@linux]$ ls -ltrh memory-layout.o 760 Nov 9 18:26 memory-layout [putta@linux]$ size memory-layout.o text data bss dec hex filename 67 8 0 75 4b memory-layout.o So now which