Re: how to obtain process physical adresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Cristina Rivera" <cris_apricot@hotmail.com> writes:

> Hi there!
>
>  
>
> I have some questions about memory management in linux. Is there any way to obtain
> the physical address of the pages that a process is ocuppying when it's loaded into
> memory or it's decided by MMU and there's no way to get this and I only can get the
> virtual address?

The physical addresses for all the pages that are present in RAM are
stored in the process' page tables.

The mm/memory.c:follow_page function shows how to see whether the page
for a given address is present in memory.  Given the page table entry
(PTE) for a present page, you can get the page frame number (pfn), the
page descriptor, the physical address, etc.

-- 
--Ed L Cashin            |   PGP public key:
  ecashin@uga.edu        |   http://noserose.net/e/pgp/


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux