[Issue 3463] Integrate Precise Heap Scanning Into the GC

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 23 11:39:22 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3463



--- Comment #43 from nfxjfg at gmail.com 2010-07-23 11:39:19 PDT ---
You're right, there seem to be some places where the bitmask size is added or
substracted twice. I don't really know; I took that code over from dsimcha's
patch without modification. I was just thankful that I hadn't to write this
code. I fixed the three issues you found. It seems to work, though I'm not 100%
sure if it's correct now.

Regarding moving collectors:

I think this would be an interesting experiment and worth trying. My patch now
has a second bitmask, where each bit tells whether a word is a moveable pointer
or not.

Instead of a second bitmap, you could just have a per-memory block flag that
tells whether a memory block is a void[] and/or contains unions with pointers.
(If the flag is set, the GC won't change any pointers inside the block.) You
could maintain that flag as additional bitmap (along NOSCAN etc). This way
storing small bitmaps inline would be simpler. Unions or fixed-size void[] are
probably seldom enough to justify this simplification. gcx.d can choose either
way to implement it using the compiler generated bitmasks.

Before actually implementing a moving GC, one should experiment how many pinned
pointers the stack/manually added ranges/unmovable pointers/datasegment
generate and how they would fragment the heap.

Also note that some runtime parts are not ready yet for a moving GC, such as
Object.toHash.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list