Re: memory allocation

2013-09-17 Thread Ian Lance Taylor
On Mon, Sep 16, 2013 at 1:43 AM, zhaobin xv wrote: > > As I know in C : > a. Global and static variables locate at data segment > b. When a function is called, memory is allocated on the stack to hold > parameter values, local variables, and the address of the calling > function > c. the struct is

Re: Memory allocation for local variables.

2006-12-13 Thread Steven Bosscher
On 12/13/06, Sandeep Kumar <[EMAIL PROTECTED]> wrote: Hi all, I tried compiling the above two programs : on x86, 32 bit machines. [EMAIL PROTECTED] ~]# gcc test.c Try with optimization enabled (try -O1 and/or -O2). Gr. Steven