1.0 KiB
1.0 KiB
Virtual memory checker
Introduction
This file is responsible for checking that there is no overlapp between virtual pages range defined in shelter/lib/include/memory/vmem_layout.h. For the full documentation about this file, please see virtual memory layout documentation.
Usage
The script is located inside shelter/tools/checker/vmem_layout_checker.py.
It can be used like that:
python shelter/tools/checker/vmem_layout_checker.py <path to header file>
Detailled processus
- Open provided file, parse it and print the list of valid regions.
- Generate
cfile.cto let the compiler do the hard work of parsing macro declaration - Compile (the
gcccompiler must be accessible inside the path) and run the generated C program - Recover the output of the program, parse it to obtain start and size of each virtual region
- Check for overlaps and return an error if something went bad during the processus
The compiled program and the C file are deleted afterward.