An open API service indexing awesome lists of open source software.

https://github.com/raezil/gc-go

simple implementation of GC three color marking algorithm in golang
https://github.com/raezil/gc-go

algorithms algorithms-implemented garbage-collector golang

Last synced: 4 months ago
JSON representation

simple implementation of GC three color marking algorithm in golang

Awesome Lists containing this project

README

        

## Garbage collector three color marking.
Object has references of objects and colour. Initialy root object starts being gray, those objects on heap starts as white.

Black objects are reachable, gray objects are gonna be processed in the future and white objects are unreachable.

Algorithm traverses through references of object, changing those objects' colours to gray. Once every object in the reference is gray, the main object becomes black. It continues to the moment there are no more gray objects to proceed. White objects that left on heap are gonna be collected by garbage collector.