https://github.com/pulkitgarg04/memory-simulator
An interactive simulation of operating system memory management to understand contiguous memory allocation, deallocation, and defragmentation.
https://github.com/pulkitgarg04/memory-simulator
c memory-allocation memory-management operating-system
Last synced: 12 days ago
JSON representation
An interactive simulation of operating system memory management to understand contiguous memory allocation, deallocation, and defragmentation.
- Host: GitHub
- URL: https://github.com/pulkitgarg04/memory-simulator
- Owner: pulkitgarg04
- Created: 2025-07-20T17:10:51.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-10-23T18:02:33.000Z (8 months ago)
- Last Synced: 2026-04-30T10:30:04.239Z (about 2 months ago)
- Topics: c, memory-allocation, memory-management, operating-system
- Language: C
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Memory Management Simulator
This project is an **interactive simulation of operating system memory management** to understand **contiguous memory allocation**, **deallocation**, and **defragmentation**.
It models a simple OS memory manager using a **doubly linked list**, where each node represents a memory chunk (either free or allocated). The program supports dynamic allocation and freeing of processes and simulates **defragmentation** to reduce fragmentation.
## Compilation & Execution
### Prerequisites
- GCC compiler
- Linux / macOS terminal (or WSL on Windows)
### Build
1. Run the following commands in your terminal:
```bash
make
```
2. Run
```bash
./memory_sim
```
3. Clean build files
```bash
make clean
```
Developed as a learning project to understand OS-level memory management algorithms and assignment given in University Coding Academy.