|
-
February 2nd, 2008, 02:37 PM
#1
Memory layout help
After reading several books and tutorials on C++ its still not clear to me
how the memory numbered.
Is it like the addresses goes from 0x000000 until the available amount of memory and then the programs assigned somewhere between them?
Or is it every program loaded into memory starts with 0x000000 and then
the processor knows some way where to access them?
Im asking this also because if i compile the same program again only with another name, i mean that i make a copy of it, it will give the same addresses
for the same variables.
-
February 2nd, 2008, 04:03 PM
#2
Re: Memory layout help
You are confusing Logical and Physical addresses. A program is based on Logcal addresses (which will typically be duplicated between programs). The hardware works on Physical addresses which are usually totally invisible to the program (and are potentially different each time the program is loaded into memory.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
February 2nd, 2008, 04:10 PM
#3
Re: Memory layout help
Ah, ok, thats why i didnt understand it, i didnt know there were two kind of addresses.
So then every program starts with 0x000000.
Thanks for clearing this up to me!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|