srijan-paul / snap

An embeddable scripting language inspired by Lua.

Home Page:https://injuly.in

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move GC to a copying collector

srijan-paul opened this issue · comments

The current implementation of GC is a naiive mark sweep garbage collector which visits every object in the object set on every cycle. To avoid fragmentation and visiting entire object sets, it would be ideal to implement Cheney's algorithm for garbage collection.

This however needs some big changes, like having a store manager, and use placement new for allocation.

Closing since I will probably be using a generational collector instead.