I know I can read the file /proc/$PID/maps
, but I was wondering if there is an API to get process memory mappings.
Asked
Active
Viewed 2,714 times
3
-
2look at http://stackoverflow.com/questions/269314/is-there-a-better-way-than-parsing-proc-self-maps-to-figure-out-memory-protectio - it is rather similar – osgx Nov 15 '10 at 21:38
-
1For this problem I actually made a kernel module that would walk the processes vma in kernel space. Parsing even a simple /proc/*/maps takes about 70us... grrr. – Thomas M. DuBuisson Nov 15 '10 at 22:49
1 Answers
1
There is no API in kernel to get this information in 1 syscall. The only universal way is to read and parse a /proc/self/maps
file.

osgx
- 90,338
- 53
- 357
- 513