How do I programmatically generate something like /proc/pid/maps ? Is there an API which can get me the same data as in /proc/pid/maps ? Parsing text can be a bit flaky.
/proc/$pid/maps is the API. If you're using C, you can reliably parse lines in this file using the scanf format:
"%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n"
(source)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With