example2.c:
------------------------------------------------------------------------------
void function(int a, int b, int c) {
long diff;
long diff2;
char *ptr;
static buff1[16], buff2[16];
static *ptr2;
char *buf1=malloc(16);
char *buf2=malloc(16);
}

void main() {
function(1,2,3);
}
------------------------------------------------------------------------------

HEAP存放已被初始化的数据,即静态变量;
BSS存放未被初始化的数据;
Stack存放动态局部变量。