A simple C++ wrapper around /proc/self/maps
This tool makes it simpler to help visualize the memory map of your process.
It's super simplistic and was created to suit my own needs. Hopefully it provides a good start for you and you'll enhance it with a few more options (and submit a PR!) :-)
Couldn't be easier.
MemoryMap m;
MemoryMap m;
m.print();
MemoryMap map;
for (auto &segment : map) {
if (segment.isWriteable()) {
segment.print();
}
}
MemoryMap is basically a collection of MemorySegments. Use it as you would a std::vector
.
MemorySegment represents a single entry/line in /proc/*/maps
. It provides a plethora of utility functions to make life more pleasant. Check the header file for a complete list.
Open an issue! :-)
PRs are more than welcome.