Is %p printed physical memory address or virual mem address?
Here is the simple code:
#include <stdio.h>
void main()
{
char a = 9;
char *ptr = &a;
printf("address is %p",ptr);
}
1, It printed out "address is 0xbfaf6745". Is that virtual addr or phyiscal addr?
2, I m actually kinda confusing about virual memory. So nobody actually gonna see physical memory address except kernel. Is this correct or not?
3, Let's take GPIO for another example. Say the GPIO base register address on a particualr microprosessor is 0x05000000. Is that virtual addr or physical addr?
|