Jump to content
  • Advertisement
Sign in to follow this  
TEUTON

Memory Areas

This topic is 4432 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can anyone tell me how the compiler divides the whole memory for its usage. I guess I read somewhere about 5 memory areas of which I only remember 4. I am listing them below. plz correct me if I am wrong. 1.Const Data Area 2.Stack Area 3.Heap Area 4.Global/Static Area 5.???

Share this post


Link to post
Share on other sites
Advertisement
Which compiler? Which linker? Which platform?

Here's an example of memory organization: http://www.awprofessional.com/content/images/chap2_0321335724/elementLinks/02fig12.jpg

Share this post


Link to post
Share on other sites
Nice link

One more question

How does compiler resolves two static variables with same name in two different functions? How does it differentiate it?

Share this post


Link to post
Share on other sites
Quote:
Original post by TEUTON
How does compiler resolves two static variables with same name in two different functions? How does it differentiate it?
The compiler doesn't care about the name once it's given every symbol an ID. The ID will be unique because the functions are different.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!