integer variable size in bss and data segment
问题 I am using a test program for understanding C memory model on linux 6.3 with kernal version 2.6.32-279.el6.x86_64 . First i have compile below code, #include <stdio.h> int main(void) { static int i = 100; /* Initialized static variable stored in DS*/ return 0; } on running size command , i got below , [root@rachitjain jan14]# size a.out text data bss dec hex filename 1040 488 16 1544 608 a.out then, after removing the intialization for static variable 'i' , my code becomes , include <stdio.h>