Moving GC

Christopher Wright dhasenan at gmail.com
Fri Dec 12 19:04:08 PST 2008


dsimcha wrote:
> == Quote from Sean Kelly (sean at invisibleduck.org)'s article
>> == Quote from Christopher Wright (dhasenan at gmail.com)'s article
>>> This isn't unreasonable, and it really just depends on how complete and
>>> how fast D's runtime reflection is.
>> This would incur more memory overhead as well.  Right now, we make
>> do with one bit per block that indicates whether the block should be
>> scanned for pointers, while this may theoretically require a pointer
>> to TypeInfo per block in order to perform precise scanning.
>> Sean
> 
> Under what use cases would this extra few bytes really matter?  What kinds of
> programs allocate so many objects that this overhead would be significant in practice?

It means that you can't use one block for objects of multiple types. 
That's a limitation on how you implement a GC, and it could possibly 
increase your overhead a lot more than converting a bit to a word. 
(Unless you use some tricks, that bit will take at least one byte, maybe 
more depending on alignment.)



More information about the Digitalmars-d mailing list