How to find all read-write memory address of a process in Linux/UNIX with C/C++ language?
问题 Through /proc file system , it's probable to read memory mappings with /proc/PID_PROCESS/maps , but is there any native APIs that dedicated for this function in C/C++ ? i.e to find out memory address that are writable and readable for process with PID 9322: %> awk -F "-| " '$3 ~ /rw/ { print $1 " " $2}' /proc/9322/maps 0804e000 0804f000 085ed000 0860e000 b7707000 b7708000 b7864000 b7865000 b7865000 b7868000 b7897000 b7898000 b78b6000 b78b7000 bfd2e000 bfd50000 And those address are passed