Click here to Skip to main content
15,881,744 members
Articles / Programming Languages / Visual C++ 9.0

static memory allocates at compile time how?

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
23 May 2012CPOL 0  
For this answer i have compiled the information from different sources but mainly from Q&A of Stackoverflow.com.A process has 5 different areas of memory allocated1. Code - text segment2. Initialized data – .data segment3. Uninitialized data – .bss segment4. Heap5. Stack...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
22 May 2012shankha2010 2 alternatives  
Hi All, I found that static memory can be allocated at compile time, as the size the object/variable going to take is predefined. My question is "how it[compiler] knows which memory location will be assign to the application by OS,[while launching the apps.] so that all the static [int...
Please Sign up or sign in to vote.
22 May 2012Jim Jos
Refer these links.. you ll get some...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Russian Federation Russian Federation
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions