3 ms·
This is how garbage collection works (CLR is one implementation): https://en.wikipedia.org/wiki/Mark-compact_algorithm https://en.wikipedia.org/wiki/Mark-compa
by Hydraulix989 8y ago
This is how garbage collection works (CLR is one implementation):
https://en.wikipedia.org/wiki/Mark-compact_algorithm https://en.wikipedia.org/wiki/Mark-compact_algorithm
- yxhuvud 8y agoNo, that clearly updates all the pointers after moving the allocations. Mesh is different as it works on the page level and use the virtual memory to achieve compaction without changing the pointers.
- masklinn 8y agoThat is very much a moving garbage collector, marked (live) objects get moved to the start of the heap for compaction. GP is specifically asking about the applicability of Mesh/TFA's non-moving capabilities for GCd systems: moving objects requires the ability to update in-system references somehow, and makes FFI more complex as references either can't be shared/leaked or specific pinning API have to be set up (or some updatable addressing scheme has to be provided but then you don't get straightforward pointers anymore).