3 ms·
Most languages have “precise garbage collectors” that always know from runtime type info which bits of an object are and are not heap pointers. Sometimes you s
by erik_seaberg 3y ago
Most languages have “precise garbage collectors” that always know from runtime type info which bits of an object are and are not heap pointers.
Sometimes you see add-on “conservative garbage collectors” that have to assume any word might be a pointer if it looks like an aligned address in an allocated page. They can’t move objects to do compaction because they’re never sure which words are not pointers.
Jacobin stores an object with a slice of its field values (each boxed as “any”) and types, so Go’s precise GC would be able to trace them: https://github.com/platypusguy/jacobin/blob/main/src/object/object.go https://github.com/platypusguy/jacobin/blob/main/src/object/...