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



--- Comment #54 from Leandro Lucarella <llu...@gmail.com> 2010-07-25 19:47:26 
PDT ---
(In reply to comment #53)
> Created an attachment (id=698) [details]
> D1 - patch for dmd for creating pointer bitmasks
> 
> Some changes to make the patch behave under 64 bit mode. Under 32 bits, the
> compiler should produce exactly the same as the patch before. Under 64 bit,
> both native 64 bit mode and cross compiling to 32 bit should work. The trick 
> is
> that PTRSIZE is a variable, not a #define.

Nice! I really hope the DMD patch is accepted :)

> @Leandro:
> 
> (to comment #52)
> I'm glad that this patch actually seems to help!
> What do you think, is compile time configurability enough, or should it be
> possible to chose at runtime?

I think something in between is the best choice. In the GC I'm working on, I've
implemented runtime configurability but at startup-time, using environment
variables. I find that being a good tradeoff, since you can make assumptions
that would be true for all the program's lifetime and you don't have to
recompile (the runtime!) to play with GC settings. But I thinks that doesn't
belong to this patch, it can be added in the future :)

For now, I think that compile-time configurability is acceptable, but it would
be better to not store type information at all if precise scanning is not
enabled (otherwise I think it would hurt more than not disabling it).

> (to comment #51)
> I'm not sure what to do about this. One could try to store the bitmap inside
> the memory block with just 1-2 bytes to save space. But in most cases, size
> alignment would make that useless. Also possible: use the same bitmask for 
> each
> page that is subdivided into bins. It's well possible that due to additional
> fragmentation this would use much more memory than it saves, though.

Yes, I think it's hard to improve things, at least under the current GC design,
but the important thing (for me) is the compiler patch, not the runtime,
because it open the doors for serious GC research. I think the runtime can be
rethought and a good design takes advantage of this extra information should be
possible in the future.

Thanks a lot for the good patches!

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

Reply via email to