On 8/14/19 9:21 PM, Gil Tene wrote:
> The fact that they visit and parse dead objects in order to identify 
> recycle-able memory is what makes them
> sweepers. Other techniques that don't visit dead objects do not perform a 
> sweep.

I am trying to understand what is your central argument here. This seems to be 
it. Are you saying
that "sweeping" is when you visit dead objects, and non-"sweeping" is when you 
do not?

>> I would leave "sweep" as something that reclaims the storage of the objects 
>> (i.e. "sweeps away" the
>> garbage), which makes M-C and M-S classes more clearly defined and easier to 
>> reason about.
> 
> When M-C implies "also does a full linear traversal that visits all dead 
> objects" (aka "a sweep"), that> terminology fails. Examples like C4, G1GC, 
> Shenandoah, and ZGC are all Mark-Compact (NO Sweep)
> collectors, while ParallelGC and Serial GC are Mark-Compact (WITH Sweep) 
> collectors. Since the math
> behind those varies dramatically in wasy that effect everyday choices, using 
> "M-C" as a classification
> that covers both leads people to misunderstand the interactions between e.g. 
> heap size and GC work.

M-C does not imply "full linear traversal that visits all dead objects". As the 
counter-example, it
is very practical to use off-side marking bitmaps to walk only live objects of 
the heap. Careful
design of such the marking bitmap would yield dramatically better results than 
using whatever
self-parsable-heap walk. You can even make it multi-level and quite dense to 
skip over large chunks
of sparse heap.

When the marking phase is a separate phase, it stands to reason that the 
subsequent phases would
have to process the marking results somehow. That would naturally do some sort 
of walk over the data
structure that handles marks. If we call that walk "sweeping", then every 
Mark-* algorithm is
necessarily "sweeping" too. So we have to break this somehow to make the 
definition viable.

Is walking _dead_ objects the discriminator for "sweeping" then? So in your 
book, if we take the
same Lisp2 collector, and compute-new-addresses and adjust-pointers steps are 
walking the
self-parsable heap (visiting dead objects along the way), it is M-S-C? But if 
it uses marking bitmap
(thus only visiting live objects), it becomes M-C? [This would be a weird flex, 
but okay].

-Aleksey


-- 
You received this message because you are subscribed to the Google Groups 
"mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mechanical-sympathy+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/mechanical-sympathy/1de1d683-164c-7163-7138-ee2f12f66638%40gmail.com.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to