Discussion:
[Gc] Difference between boehm gc algorithm and mark-n-sweep
(too old to reply)
Vladimir Miloserdov
2016-06-13 18:53:11 UTC
Permalink
Raw Message
Hello

I'm new to this GC and I'm curious about the difference between
collector algorithm it uses and regular mark-n-sweep algo. The only
thing I'm able to find is that it uses "modified mark-n-sweep". Could
you please help me?

Regards,
Vladimir
Bruce Hoult
2016-06-14 06:48:01 UTC
Permalink
Raw Message
It's certainly mark-n-sweep, though optimised in some ways to reduce pause
times and generally be friendly to multi-level memory hierarchies (e.g.
virtual memory paging, when bdwgc was young, though it's more about L3
cache and RAM and even TLB now).

e.g.

- mark bits are not stored with the objects, so a memory page filled with
dead objects will not be touched at all during the mark phase.

- the sweep is done incrementally, with each page being swept (and its free
list created) at the moment that the first new object will be allocated
from that page after the previous GC.
Post by Vladimir Miloserdov
Hello
I'm new to this GC and I'm curious about the difference between
collector algorithm it uses and regular mark-n-sweep algo. The only
thing I'm able to find is that it uses "modified mark-n-sweep". Could
you please help me?
Regards,
Vladimir
_______________________________________________
bdwgc mailing list
https://lists.opendylan.org/mailman/listinfo/bdwgc
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Loading...