CLI Utility to Calculate Indices for Page Tables

Published by Philipp Schuster on

Screenshot of the `paging-calculator` CLI utility

I just want to drop a short notice that I created a small CLI utility that I think is helpful. paging-calculator helps you to calculate the indices for a given virtual address that are used for the physical address lookup at different page table levels. Paging is a mechanism that operating systems use for memory management.

Check it out on or GitHub. You can install it with cargo install paging-calculator.

It works as shown in the following screenshot:

For x86, there are (at least?) four different paging modes: 32-bit paging, 32-bit paging with PAE, 64-bit 4-level paging (nowadays the most common one) and 64-bit 5-level paging (relatively new). So far, my utility only covers regular 32-bit and regular 64-bit paging. However, I plan to extend my utility and I think that it is even very useful in the current state.

I was working on OS-related topics and wanted to set up a page table from assembly code. As I had some trouble, I tried to understand how everything works. In the end, I created this utility.

Philipp Schuster

Hi, I'm Philipp and interested in Computer Science. I especially like low level development, making ugly things nice, and de-mystify "low level magic".


Leave a Reply

Your email address will not be published. Required fields are marked *