Hi, I am trying to do some analysis with the logical address. The following program explains my motive ...
#include<stdio.h>
int main()
{
int x=10;
printf("The address of main is %p\n",&main);
printf("The address of x is %p\n",&x);
return 0;
}
When I run this program in my 32bit system it shows
The address of main is 0x80483b4
The address of x is 0xbfe3b1e0
size page_size
text data bss dec hex filename
993 260 4 1257 4e9 page_size
getconf PAGESIZE
4096
I wish to relate the logical address to the page size.. I mean to say how this logical address creates (in terms of offset,page,data)
For this program size is 1257 bytes but i think whole page will get loaded (correct me if I am wrong) is there any way that I can be sure that whole page get loaded or only 1257bytes get loaded.
I hope my question is clear in case any discrepancy please let me know. Thanks