https://github.com/adilevi25/memorymanageroop
A C++ memory management system using OOP principles
https://github.com/adilevi25/memorymanageroop
allocator cpp data-structures memory-management oop simulation
Last synced: 9 months ago
JSON representation
A C++ memory management system using OOP principles
- Host: GitHub
- URL: https://github.com/adilevi25/memorymanageroop
- Owner: AdiLevi25
- Created: 2025-07-13T21:09:52.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-07-13T21:48:35.000Z (9 months ago)
- Last Synced: 2025-07-13T23:33:19.789Z (9 months ago)
- Topics: allocator, cpp, data-structures, memory-management, oop, simulation
- Language: C++
- Homepage:
- Size: 260 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MemoryManagerOOP
This project implements a custom memory management system in C++ using Object-Oriented Programming principles.
It was developed as part of an academic assignment in the Electrical and Electronics Engineering department at Ort Braude College.
## ๐ Project Overview
The system simulates memory allocation using a fixed-size memory pool and supports the following allocation strategies:
- **First Fit**
- **Best Fit**
- **Worst Fit**
Each strategy is implemented in a dedicated class that inherits from a shared abstract base class `MemoryManager`.
## ๐งฉ Components
- `Block` โ Represents a single memory block in the pool.
- `MemoryManager` โ Abstract base class for managing the memory pool.
- `FirstFitAllocator` / `BestFitAllocator` / `WorstFitAllocator` โ Subclasses implementing allocation algorithms.
- `MemorySimulator` โ Contains simulation scenarios to compare the algorithms.
- `Main.cpp` โ Contains tests and verification for each class and scenario.
## โ๏ธ Build Instructions
To compile the project using g++:
```bash
g++ -std=c++11 Main.cpp Block.cpp MemoryManager.cpp FirstFitAllocator.cpp BestFitAllocator.cpp WorstFitAllocator.cpp MemorySimulator.cpp -o memory_manager
```
To run:
```bash
./memory_manager
```
> Ensure you are in the directory containing all `.cpp` and `.h` files.
## ๐งช Testing
The project includes custom test functions within `Main.cpp` to verify:
- Correct block management (allocation, splitting, merging)
- Strategy-specific behavior
- Edge cases and exception handling
- Simulation performance and peak usage
## ๐ผ๏ธ Simulation Output
Here is a sample from the simulator run (First Fit, Best Fit, Worst Fit):
### โ
Part 1: First Fit & Best Fit Scenarios

### โ
Part 2: Worst Fit & Summary

## ๐ค Authors
- Adi Levi โ [LinkedIn](https://www.linkedin.com/in/adi-levi-5008858269/)
- Aviv Friedman - [LinkedIn](https://www.linkedin.com/in/aviv-friedman-38719426b/)
## ๐ License
This academic project is shared for learning purposes.