mem_offset

Is there a way to do the reverse of mem_offset, that is taken a physical
address you can tell if it’s mapped in the process address space and if it
is you can get a valid pointer to it.

  • Mario

Mario Charest wrote:

Is there a way to do the reverse of mem_offset, that is taken a physical
address you can tell if it’s mapped in the process address space and if it
is you can get a valid pointer to it.

  • Mario

Not really in a portable way (yet).

On x86, you could take a walk through the page tables for your paddr. A
ptr of 0xFFFFF000 will be your ptr to the L1 page table in your own
process address space, if you’re interested.


Cheers,
Adam

QNX Software Systems
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>