https://github.com/iamdyeus/memulatrix
Virtual Memory Simulator built with C++ and Python
https://github.com/iamdyeus/memulatrix
cpp operating-system python virtual-memory
Last synced: about 1 month ago
JSON representation
Virtual Memory Simulator built with C++ and Python
- Host: GitHub
- URL: https://github.com/iamdyeus/memulatrix
- Owner: iamDyeus
- Created: 2025-03-15T10:42:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-26T08:38:42.000Z (about 1 year ago)
- Last Synced: 2025-05-26T09:57:22.568Z (about 1 year ago)
- Topics: cpp, operating-system, python, virtual-memory
- Language: C++
- Homepage:
- Size: 304 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Memulatrix
Virtual Memory Simulator for educational purposes, built with C++ and Python.


> [!IMPORTANT]
We are currently working on the project. Please check back later for updates and better documentation.
## Proposed Project Structure
The project is organized into the following directories:
```
Memulatrix/
│── docs/ # Documentation (README, architecture diagrams, API docs)
│── src/ # Source code
│ ├── cpp/ # C++ core simulation
│ │ ├── include/ # Header files (.h)
│ │ ├── src/ # C++ source files (.cpp)
│ │ ├── tests/ # Unit tests for C++ modules
│ │ ├── CMakeLists.txt # CMake configuration for C++ build system
│ ├── python/ # Python UI & visualization
│ │ ├── ui/ # Tkinter UI components
│ │ ├── visualization/ # Matplotlib-based visualizations
│ │ ├── bridge/ # C++-Python communication layer
│ │ ├── main.py # Entry point for the UI
│ │ ├── requirements.txt # Python dependencies
│── build/ # Compiled binaries & intermediate build files
│── tests/ # End-to-end tests & integration tests
│── examples/ # Sample test cases for simulation
│── logs/ # Runtime logs, memory usage stats
│── Makefile # Alternative to CMake for build automation
│── .gitignore # Ignore compiled files, logs, etc.
│── README.md # Project overview
```
## Installation
### Prerequisites
- C++ compiler (g++) - version 14
- Python 3.8 or higher
### Build CPP Core
1. Create the `bin` folder in the root directory:
```bash
mkdir bin
```
you'll get something like `Memulatrix/bin`
2. Navigate to the `src/cpp` directory:
```bash
cd src/cpp
```
you'll be in something like `Memulatrix/src/cpp`
3. Run the build command:
```bash
g++ -std=c++14 -Iinclude -DCPPHTTPLIB_NO_UNIX_SOCKETS src/virtual_memory_simulator.cpp src/page_table.cpp src/socket_handler.cpp -o D:\projects\Memulatrix\bin\virtual_memory_simulator.exe -lWs2_32
```
Manually verify that the `virtual_memory_simulator.exe` file is created in the `bin` directory.
4. Run the Python UI from the root directory:
```bash
python src/python/main.py
```