MemViewer is a utility for software developers to view the memory required by their compiled programs. It can extract information from linker map files or ELF files. MemViewer then creates a simple image using the squarify treemap layout algorithm that gives a quick way to inspect the memory. You can easily filter the data to display what matters to you.
Here is a simple example of the output:
Install Python 3.9 or newer for your platform, if it is not already available
pip install memviewer
You can either run the script directly:
memviewer {my_program.map}
or as a Python package:
python -m memviewer {my_program.map}
For details on the available options, provide a --help
argument.
Here is an example:
python -m memviewer --address-prefix=0x08 --filename-prefix src/CMakeFiles/playground_boot.elf.dir/ --groupby source memviewer/test/example_01.map
MemViewer is released under the permissive Apache 2.0 license. See the License File for details.
- Tools used
- Linker map files
- Buried Treasure and Map Files, Elecia White, 2021.
- Get the most out of linker map file, Cyril Fougeray, 2019
- Other tools to consider: