LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-07-2010, 06:30 PM   #1
DBQ
LQ Newbie
 
Registered: Sep 2007
Posts: 2

Rep: Reputation: 0
Converting virtual address to physical address in the kernel


Hi everybody. I am trying to convert a virtual address to physical address in the linux kernel. I use this approach: first get the page struct which corresponds to the virtual address and then use page_address() to get the physical address.

I did an experiment where I used the above method to convert the starting address of the process heap and the ending address of the process heap (start_brk and brk from mm_struct) for the process which uses lots of memory. Resulting physical addresses are the same as virtual addresses, and the ending address exceeds the total physical memory of the system. How can this be? Am I doing something wrong? Any suggestions?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to translate virtual address to physical address in linux application saurin Programming 1 11-18-2009 09:05 PM
Find virtual to physical address mapping in Kernel? bkankru Linux - Kernel 2 11-09-2009 02:15 PM
how to find physical address of kernel virtual address kushneeraj Programming 0 10-20-2006 07:29 PM
API for mapping Physical Address to Virtual Address Lakshman_smt Linux - Software 2 10-15-2006 09:08 PM
Memory Mapping (same physical address = virtual address) skd.tech Linux - Kernel 7 07-24-2006 11:13 PM


All times are GMT -5. The time now is 12:05 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration