Avatar

Aidan O'Brien

CS Student

Download Resume
thumbnail

Heap Simulator

CMemory ManagementSystems Programming

Memory allocator with best-fit strategy and block coalescing

This project involved developing a heap memory simulator from scratch, replicating how low-level memory allocation works in modern systems. Each memory block in the simulator consists of a header, payload, and footer, and memory is allocated in 8-byte aligned chunks to mimic real-world constraints.

The allocator implements a best-fit allocation strategy: when a memory request is made, the system searches the free list and selects the block that most closely matches the requested size. To make the most of available space, the simulator supports free block splitting (breaking up larger blocks) and block coalescing (merging adjacent free blocks when necessary).

This project deepened my understanding of dynamic memory management, memory alignment, fragmentation, and the internal design of allocators like malloc. Though not open-source due to academic policies, this simulator reflects my foundational experience in systems programming and efficient data structure manipulation.

2025 — Built by Aidan O'Brien