Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.33 KB

README.md

File metadata and controls

32 lines (20 loc) · 1.33 KB

Nanobyte physical allocators

Some physical memory allocator implementations.

Build instructions

The project only needs g++ and make for building. To build, simply open a terminal and type

make

Visualizers

Visualizers are Python scripts that can take the output generated by the XXXXAllocator.Dump() method and turn it into an image.

Most of them depend on the cairo library (install it with PIP. E.g. sudo pip3 install cairo). The Linked List visualizer also depends on the graphviz python library, as well as the graphviz package from your package manager.

The way I used them was to modify the demo project, and set up whatever scenario I want to visualize. Finally I call Dump() and pipe the output into the visualizer. For example:

run-demo.sh | python ./bitmap_visualize.py

Obviously, you must not print anything else to the standard output (use stderr if you really have to).

Project structure

  • src/phallocators - this is a static library where the physical allocators are actually implemented
  • src/demo - a demo application showing how to use the allocators
  • src/tests - some unit tests for verifying that the physical allocators work properly
  • visualizers - a bunch of python scripts for creating pretty pictures showing the state of the allocators