More precise GC

Steven Schveighoffer schveiguy at yahoo.com
Mon Mar 29 04:09:09 PDT 2010


On Sun, 28 Mar 2010 23:30:32 -0400, Robert Jacques <sandford at jhu.edu>  
wrote:

> On Sun, 28 Mar 2010 16:16:41 -0300, Steven Schveighoffer  
> <schveiguy at yahoo.com> wrote:
>> The current GC has a simple "type info" if you will -- contains  
>> pointers or doesn't contain pointers.  It doesn't mean we cannot add to  
>> that.  In fact, I think dsimcha has provided a way to have precise  
>> scanning for heap-allocated types.  I don't think a reasonably precise  
>> GC is out of the question.  However, it may be too much to require the  
>> GC to do semantic analysis of enums for unions.  Not impossible, but  
>> probably not worth the effort and restrictions necessary.
>>
>
> Also, don't forget that classes have a bunch of runtime type info.

But the GC doesn't use/need this info (except to call the destructors).   
At least the mark/sweep portion doesn't.

-Steve



More information about the Digitalmars-d mailing list