Skip to content

cattifft/garbage-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Garbage Collection/Defragmentation Project Completed May 2024 for Systems I at the University of Denver

This project is a simulation of Java's memory allocation and garbage collection systems written in C. It works similarly to C's malloc and free, although the client must manually free memory. You can set BEST_FIT or FIRST_FIT to change how the program allocates memory.

In each version, the mallocTest.c file simulates the client mallocing and freeing memory. The memoryDump function displays what the simulated heap looks like.

Version 2 adds the managed pointer system, allowing memory blocks to change locations. Version 3 adds defragmentation, and Version 4 adds an old generation, which is a collection of memory that is degragmented less often.

To run the Version 4 simulation, cd into the Version4 folder, edit mallocTestVersion4.c if desired, then run "make mallocTestVersion4" and ./mallocTestVersion4.

About

Garbage collection simulation written in C.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors