Get the latest tech news

A simple semi-space collector – wingolog (2022)


wingolog: article: a simple semi-space collector

Just to recap, the big picture here is that a semi-space collector divides a chunk of memory into two equal halves or spaces, called the fromspace and the tospace. The GC-user interface does need to have some minimum surface area, though, for example to enable inlining of the hot path for object allocation. Personally I think the most interesting aspect of a semi-space collector is the so-called “Cheney scanning algorithm”: when we see an object that’s not yet traced, in visit_field, we copy() it to tospace, but don’t actually look at its fields.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of wingolog

wingolog