Order of Memory Locations
Hello All,
I have the following Memory addresses .
Address of function
f1 :80483a0
f2 :80483e8
main :80483ff
Address of all the local variables in main
uila :bfedb4d4
ila :bfedb4d0
uisl :80498c8
isl :80498c0
Iam in a linux environment.
I want to know what would be increasing order ( memory locations).
To put in a simple words , i want to know how the OS gives memory locations ( address) to C / C++ programs ?
Will it vary with the 16 bit , 32 bit , 64 bit computers ?
Will this depends on the RAM of our computer ?
Does this depend on the OS we use ?
regards
vlrk
What will be increasing order ?
Thanks for your reply
I would like to know the increasing order of memory locations?
Address of function
f1 :80483a0
f2 :80483e8
In above case does a0 is the first one or e8 is the first one.
i want to know the offset of the memory locations .
If iam not wrong these fuctions comes into Text/Code section of the exectutable , when it loaded into memory.
Differenence in the Local and Heap Memory locations?
Why there is difference in the heap , static and local memory locations.
If we observer the below memory locations it shows that functions, static memory variables , global variable and heap meomory variables are of only 7 digits where as local variables are of 8 digits
Code:
Output
Address of function f1:80483a0, f2:80483e8 and main :80483ff
Address of all the local variables in main
uila :bffdf8e4, ila :bffdf8e0 uisl :80498c8 isl:80498c0
Address of all the global variables in main
uig1:80498cc ig1:80498b4
uig2:80498d4 ig2:80498b8
uig3:80498d0 ig3:80498bc
Address of dynamically allocated memory : 916c008
Addresses of all the local and parameter variables of f1
Addresses of parameter variables pa:bffdf8c0 pb:bffdf8c4
Addresses of local variables x:bffdf8b4 y:bffdf8b0
Addresses of all the local and parameter variables of f1
Addresses of parameter variables pa:bffdf8b0 pb:bffdf8b4
Addresses of local variables x:bffdf8a4 y:bffdf8a0
Addresses of all the local and parameter variables of f1
Addresses of parameter variables pa:bffdf8c0 pb:bffdf8c4
Addresses of local variables x:bffdf8b4 y:bffdf8b0
is it any thing related to the 32 bit or 64 bit computers?
How to know does our system is of 32 bit or 62 bit based ?
Memory Location Addresses , a hint to 32bit/64 bit computer ..?
I think even this addressing helps in knowing the 32 bit / 64 bit ..?
i feel so because at any point of time there will 8 hexa decmial bits and in binary every
hexa decimal bit is equal to four bits so 4 * 8 = 32 bits.
Am i right or wrong ?