Re: [Gc] Difference between boehm gc algorithm and mark-n-sweep

Bruce Hoult <[email protected]> Tue, 14 Jun 2016 09:48:01 +0300
Newsgroups gmane.comp.programming.garbage-collection.boehmgc
Message-ID <CAMU+EkyH-P2qQGojDB-mtMO2s=Gi0aVeMofrEqu=6u304LLiUw@mail.gmail.com>
--===============0461549840==
Content-Type: multipart/alternative; boundary=001a114b4162e6fc1105353762b0

--001a114b4162e6fc1105353762b0
Content-Type: text/plain; charset=UTF-8

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.


On Mon, Jun 13, 2016 at 9:53 PM, Vladimir Miloserdov <[email protected]>
wrote:

> 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
> [email protected]
> 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.
>
>

--001a114b4162e6fc1105353762b0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">It&#39;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&#3=
9;s more about L3 cache and RAM and even TLB now).<div><br></div><div>e.g.<=
/div><div><br></div><div>- 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.</div><div><br></div><div>- the sweep is done incrementally, wit=
h 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.</d=
iv><div><br></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_=
quote">On Mon, Jun 13, 2016 at 9:53 PM, Vladimir Miloserdov <span dir=3D"lt=
r">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">milosvova@g=
mail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello<br=
>
<br>
I&#39;m new to this GC and I&#39;m curious about the difference between<br>
collector algorithm it uses and regular mark-n-sweep algo. The only<br>
thing I&#39;m able to find is that it uses &quot;modified mark-n-sweep&quot=
;. Could<br>
you please help me?<br>
<br>
Regards,<br>
Vladimir<br>
_______________________________________________<br>
bdwgc mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]</a><=
br>
<a href=3D"https://lists.opendylan.org/mailman/listinfo/bdwgc" rel=3D"noref=
errer" target=3D"_blank">https://lists.opendylan.org/mailman/listinfo/bdwgc=
</a><br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
--<br>
This message has been scanned for viruses and<br>
dangerous content by MailScanner, and is<br>
believed to be clean.<br>
<br>
</font></span></blockquote></div><br></div>

--001a114b4162e6fc1105353762b0--

--===============0461549840==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
bdwgc mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/bdwgc
--===============0461549840==--