www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - GC high level overview/documentation?

reply "Ethan" <gooberman gmail.com> writes:
Ahoy.

For those that don't know (ie almost everyone here), I'm Ethan.
I've known Manu since 2002 and worked with him at Krome and
Remedy. I'm still at Remedy, and I've been the point man for D
usage and integration since Manu left.

I'm finally taking a look at the garbage collector and memory
management. D's memory footprint for our usage is pretty low at
the moment, so the GC is really fast because collect never gets
triggered. That's going to change before the end of the project
though, so I'm going to get on top of it before it becomes a
problem.

Is there a high level overview of how the runtime expects the
garbage collector to behave anywhere, or any kind of
documentation outside of the core.memory and garbage collection
documentation on dlang.org? If there isn't, I'll probably end up
documenting it myself as I go through and learn how it works. I
expect I'll miss things or make silly mistakes though, so if this
documentation already exists that would be quite beneficial.

I'll likely be branching off/creating a new GC for our needs, so
becoming rather knowledgeable on the GC is something I need to do.

Thanks all.
Mar 13 2014
next sibling parent Manu <turkeyman gmail.com> writes:
--001a11c2c4847ffc6704f47d19bc
Content-Type: text/plain; charset=UTF-8

On 13 March 2014 23:14, Ethan <gooberman gmail.com> wrote:

 Ahoy.

Gday bloke! Fancy seeing you around here :) --001a11c2c4847ffc6704f47d19bc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1= 3 March 2014 23:14, Ethan <span dir=3D"ltr">&lt;<a href=3D"mailto:gooberman= gmail.com" target=3D"_blank">gooberman gmail.com</a>&gt;</span> wrote:<br>= <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p= adding-left:1ex"> Ahoy.<br> </blockquote></div><br></div><div class=3D"gmail_extra">Gday bloke! Fancy s= eeing you around here :)<br></div><div><br></div></div> --001a11c2c4847ffc6704f47d19bc--
Mar 13 2014
prev sibling next sibling parent "Daniel Murphy" <yebbliesnospam gmail.com> writes:
"Ethan"  wrote in message news:dohuegdsqrdwfzycmsic forum.dlang.org...

 Is there a high level overview of how the runtime expects the
 garbage collector to behave anywhere, or any kind of
 documentation outside of the core.memory and garbage collection
 documentation on dlang.org? If there isn't, I'll probably end up
 documenting it myself as I go through and learn how it works. I
 expect I'll miss things or make silly mistakes though, so if this
 documentation already exists that would be quite beneficial.

Not as far as I know. One thing that may be helpful is searching for closed bugzilla issues and pull requests that touch the GC, as some of these contain very useful information about how things are supposed to work.
Mar 13 2014
prev sibling next sibling parent "safety0ff" <safety0ff.dev gmail.com> writes:
Leandro Lucarella's blog contains a large amount of relevant 
information: 
http://www.llucax.com.ar/blog/blog/tag/understanding%20the%20current%20gc
Mar 13 2014
prev sibling next sibling parent "Chris Williams" <yoreanon-chrisw yahoo.co.jp> writes:
On Thursday, 13 March 2014 at 13:14:03 UTC, Ethan wrote:
 Is there a high level overview of how the runtime expects the
 garbage collector to behave anywhere, or any kind of
 documentation outside of the core.memory and garbage collection
 documentation on dlang.org?

There was a presentation at last year's DConf by Sociomantic on their replacement GC. I believe that it included a bit of info on the internals of the original collector, though.
Mar 13 2014
prev sibling parent "Ethan" <gooberman gmail.com> writes:
On Thursday, 13 March 2014 at 19:44:18 UTC, Chris Williams wrote:
 There was a presentation at last year's DConf by Sociomantic on 
 their replacement GC. I believe that it included a bit of info 
 on the internals of the original collector, though.

Yeah, Manu put me on the Rainer Sch├╝tze's talk from DConf, which definitely gets more to where I want to be from the start. My initial investigations made me do a double take when I saw that the default garbage collector scans entire blocks of memory for pointers rather than the blocks of memory known to hold pointers. Thanks for the input, all.
Mar 14 2014