Re: how to get physical memory address from virtual memory address
- From: Douglas O'Neal <oneal@xxxxxxxxxxxx>
- Date: Fri, 01 Sep 2006 09:26:46 -0400
Tim Roberts wrote:
"David Schwartz" <davids@xxxxxxxxxxxxx> wrote:Hari wrote:Hi ,There isn't one. You haven't allocated any physical memory, so the
I am using Linux 2.4.20 Kernel. I am runing an application which will
malloc and returns a virtual memory address. I need to get the physical
memory address for that virtual memory address. How can I get that?
kernel doesn't give you any.
What?? This is entirely incorrect. EVERY valid virtual address has an
associated physical address. In the case of malloc-ed memory, that
physical address will be in physical memory.
Addressing the OP, while you are in user mode, the physical address can
change at any time. The only reliable way to get the physical address is
within a kernel driver.
Where does the physical memory come from when you turn on virtual memory
overcommits? Look at Documentation/vm/overcommit-accounting in your
kernel sources. Setting vm.overcommit_memory=1 is indeed useful in some
circumstances but can lead to unpredictable process deaths.
--
Dr. Douglas O'Neal
Manager, Bioinformatics Center
Delaware Biotechnology Institute
(302) 831-3456
.
- References:
- Re: how to get physical memory address from virtual memory address
- From: Tim Roberts
- Re: how to get physical memory address from virtual memory address
- Prev by Date: Re: block size more than 4096 in ext2/3
- Next by Date: Re: how to get physical memory address from virtual memory address
- Previous by thread: Re: how to get physical memory address from virtual memory address
- Next by thread: Re: how to get physical memory address from virtual memory address
- Index(es):
Relevant Pages
|