--- Comment #43 from nfx...@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
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
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------