A Mark-and-Sweep Garbage Collector
Find a file
2024-08-20 22:17:24 -04:00
.gitignore Added LICENSE 2024-08-20 22:17:24 -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
LICENSE Added LICENSE 2024-08-20 22:17:24 -04:00
main.c VM: added deinitVM() and replaced calls to free() 2024-08-20 14:45:13 -04:00
Makefile Make: added vm.c to SRCS 2024-08-20 10:51:32 -04:00
README.md Update README 2024-08-20 20:20:04 -04:00
test_gc.h Added basic testing 2024-08-20 13:19:39 -04:00
vm.c VM: added deinitVM() and replaced calls to free() 2024-08-20 14:45:13 -04:00
vm.h VM: added deinitVM() and replaced calls to free() 2024-08-20 14:45:13 -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 gcc. Compiling with clang is also possible, simply replace "gcc" with "clang" in the first line of the Makefile.

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. Thank you to Robert Nystrom for the idea.