Latest memory virtual xp Weblinks:
This article tells how much memory should be kept as virtual memory.- how to get physical memory address from virtual memory address
Hi , I am using Linux 2.4.20 Kernel. I am runing a application which will malloc and give a virtual memory address. I need to get the physical memory location of that. Can any one help me in this ? Thanks in advance, -Hari- Re: how to get physical memory address from virtual memory address
Hari wrote: Get it for what purpose? As it is process virtual memory, the physical address may change at any time due to paging activity!- Re: how to get physical memory address from virtual memory address
This is not a task that should be performed by the user-level process. You can't for example test the memory which is permanently mapped by kernel (which user-level process is not allowed to access). For memory diagnostics, tools specifically crafted for such tasks should be used (such as memtest86).- Re: how to get physical memory address from virtual memory address
Hari wrote: You have to do this in the kernel. Firstly, the page obviously has to be nailed down (unswappable). Otherwise it has no fixed physical address. When paged out, it has no address at all, and may get a different physical address each time it is paged out. You can do this using the get_user_pages() kernel function, which will- Re: how to get physical memory address from virtual memory address
Correct, if by "valid" you mean "mapped and present" so that touching the page doesn't give rise to an exception. However, there can be mapped pages which are not present. Change or disappear temporarily (become not present).- Re: how to get physical memory address from virtual memory address
Unless of course the memory is swapped out at the moment, which is entirely possible after a fresh malloc() of a big chunk of memory. Correct
FREE NEWSLETTER
|
| Latest News, and Special Offers on Memory enter your name and email address here: |
|
|
|
|