3 ms·
Quite cool. But I miss the part where you can actually use the objects themselves to store something in. What's your goal here? To have a real usable gc, becuas
by ckok 7y ago
Quite cool. But I miss the part where you can actually use the objects themselves to store something in. What's your goal here? To have a real usable gc, becuase if so, it should probably allocate outside the Go heap, and directly from the OS? Also the fields should probably be packed:
Name string
Rc int
Crc int
Color string
Buffered bool
Children []*Object
Freed bool
isAcyclic bool
as those seem to have quite a bit of overhead for an object.
- sendilkumarn 7y agoI completely agree. My goal here is to learn and debug what is happening. (intention is to backport this into tinygo) There are a plenty of steps to make it into usable gc.
- ckok 7y agoAh that makes sense. I did the "non thread safe" version of this paper for our webassembly support (Because at the time, Boehm didn't support it) https://github.com/remobjects/IslandRTL/blob/master/Source/SimpleGC.pas https://github.com/remobjects/IslandRTL/blob/master/Source/S... But the threadsafe one does have a lot of raw edges, and I couldn't get that one working.
- sendilkumarn 7y agoThats cool. I think assemblyscript has implemented it. Something you might be interested to explore
- ckok 7y agoyeah. But for multithreaded I figure there's little chance I can do better than Boehm (especially considering the testing involved in this).