[D-runtime] D Concurrent GC
Steve Schveighoffer
schveiguy at yahoo.com
Tue Sep 28 08:19:35 PDT 2010
----- Original Message ----
> From: Sean Kelly <sean at invisibleduck.org>
>
> On Sep 27, 2010, at 3:09 PM, Leandro Lucarella wrote:
> >
> > Sean Kelly, el 24 de septiembre a las 09:47 me escribiste:
> >
> >> I'll have to see what I've changed in the GC since creating druntime
> >> as well. Nothing major I think though.
> >
> > I think the array appending changes are the bigger since the last time
> > I checked.
>
> There's an APPENDABLE flag now. I'll check the diffs in the GC code to see if
>there's anything else. Thanks for the reply!
Basically, APPENDABLE is used to mark a memory block as being an appendable
array. This helps prevent accidental appending when the array runtime code
hasn't been used.
It was pretty easy to add, I just copy-pasted some code that creates the bits.
The toughest part really was to go through all the modules that define BlkAttr
and add the APPENDABLE flag (unsure why this isn't done in one place...).
There are some other changes I made, particularly to extend. Basically, the old
extend would give up after adding one page if it was available. I changed it to
add as many pages as possible up to the upper limit request size. This helps
keep appending amortized because the array grows proportionately instead of one
page at a time.
However, if your GC does not implement this, it's not a severe problem, it just
won't perform quite as well when appending.
-Steve
More information about the D-runtime
mailing list