Re: pointer address is physical or virtual.
- From: Jiri Kosina <jikos@xxxxxxxx>
- Date: Fri, 15 Dec 2006 16:25:27 +0100
On Fri, 15 Dec 2006, Prasad wrote:
Created two copies of it for simultaneous execution, ran them from two
different terminals
[Prasad@prasadjoshi test]$ ./instrument_functions
In Entry Function. Pointer : 0x804844e
In Main.
In Entry Function. Pointer : 0x8048414
In afun ().
In Exit Function. Pointer : 0x8048414
[Prasad@prasadjoshi test]$ ./instrument_functions1
In Entry Function. Pointer : 0x804844e
In Main.
In Entry Function. Pointer : 0x8048414
In afun ().
In Exit Function. Pointer : 0x8048414
Now, I am not getting how could these both processes where loaded in
the same memory as they are having same addresses for the functions?
So finally I have two questions.
1. Whether addresses printed from user program are virtual one or
physicall one.
Virtual.
Both the processess have the same virtual addresses, but kernel keeps
different page tables for each process, so that they are resolved to
different physical addresses when accessed.
--
Jiri Kosina
.
- Follow-Ups:
- Re: pointer address is physical or virtual.
- From: Prasad
- Re: pointer address is physical or virtual.
- From: Prasad
- Re: pointer address is physical or virtual.
- References:
- pointer address is physical or virtual.
- From: Prasad
- Re: pointer address is physical or virtual.
- From: Hadron
- Re: pointer address is physical or virtual.
- From: Prasad
- pointer address is physical or virtual.
- Prev by Date: Re: pointer address is physical or virtual.
- Next by Date: Re: newbie delay/sleep question
- Previous by thread: Re: pointer address is physical or virtual.
- Next by thread: Re: pointer address is physical or virtual.
- Index(es):
Relevant Pages
|