A simple system program that implements a programming language memory manager and a garbage collection system
This is a school project (Project 3) for Computer Systems 2 (CSC45500) were lexical analyzer and parser was made to create an interpreter that supports dynamic memory allocation to varibale, copying varibales (references), free allocated space, garbage collection, and freelist compression.
- Clone the git repository:
git clone https://github.com/ErkanPerkan25/Memory_Management_and_Garbage_Collector_project.gitUsed the Makefile provided in the repo which creates a executable called exe, this is done by running this command:
make
To run the program you need start it with this command:
./exe
When statred it will ask you for a heap size and a input file.
The program has a bug when it comes to the references. It does not go by the right allocated memory block. To fix this, I would have to re-implement the way I decied to create the list of block pointers. It did make it a bit messy, but got most of it working.
-
What platform you developed your solution on (i.e Linux, OS/X, Windows (God forbid!), ...)
Arch Linux -
Overview of how I solved the project.
For each step I took in this project I would hand-trace every detail to get the hang of what is going on in the program. And then I would slowly start to implement piece by piece. I would test each little piece to see if it would work, and then move on if it did.