A Mark-and-Sweep Garbage Collector
Find a file
2024-08-20 13:18:35 -04:00
.gitignore Added .gitignore 2024-08-19 15:50:17 -04:00
gc.c GC: remove return value from collect() 2024-08-20 13:16:27 -04:00
gc.h GC: remove return value from collect() 2024-08-20 13:16:27 -04:00
main.c first commit 2024-08-19 15:42:35 -04:00
Makefile Make: added vm.c to SRCS 2024-08-20 10:51:32 -04:00
README.md README: added external dependencies 2024-08-19 15:54:19 -04:00
vm.c VM: define initial GC threshold and check malloc for NULL 2024-08-20 13:18:35 -04:00
vm.h VM: define initial GC threshold and check malloc for NULL 2024-08-20 13:18:35 -04:00

marCsweep

A mark-and-sweep garbage collector with a simple virtual machine to perform allocations.

Building

Compiling the project should be relatively easy, even if you aren't familiar with make.

Dependences: git, make, and the C compiler of your choosing (the Makefile assumes gcc).

git clone https://codeberg.org/andyscott/marCsweep.git

cd marCsweep

make release

That's it! The Makefile will automatically create the build directory and place the compiled executable there.

Notes

This is a personal project that I am writing in my free time to learn more about garbage collection. That said, please remember that it does allocate real memory, which should not be taken lightly!