开发者

Can I walk through my process' page table in userspace?

Can anyone suggest some learning materials to accomplish my question? I'm working with the Linux kernel.

I'm planning on conducting an experiment, but need access to my process' page table, and so far have only found kernel space code to acc开发者_如何学运维omplish what I want.

Thanks


You'll probably find the information you want in the proc filesystem, under /proc/self. In particular /proc/self/maps contains the list of memory mappings in the process, with an indication of their permission and file when applicable. There is a little more information in /proc/self/smaps. You'll have to look in the kernel documentation for the format, specifically Documentation/filesystems/proc.txt.


Accurate memory metrics can be given by pagemap kernel interface - utilized in libpagemap library https://fedorahosted.org/libpagemap/. Library provides also userspace utils so you can start monitor memory immediately.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜