简体   繁体   中英

How to get physical address for any address in FreeBSD from userspace?

For some investigation, I need to find out the physical address of a pointer on FreeBSD 12. On Linux, I would do that with /proc/self/pagemap but on FreeBSD, I have not found a way to do it.

So, is there a way to get the physical address of any virtual address from user-space in FreeBSD?

For FreeBSD, See macro vtop

find(1) and xargs(1) are your friends:

find /usr/include /usr/src/sys -type f -name '*.h' -print0 \
| xargs -0 egrep -i vtop | less

I think this is a good starting point ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM