== Quote from Craig Black (craigbla...@cox.net)'s article
> "dsimcha" <dsim...@yahoo.com> wrote in message
> news:hcdsbq$4i...@digitalmars.com...
> > After a few evenings of serious hacking, I've integrated precise heap
> > scanning
> > into the GC.
> Awesome!  Thank you so much for doing this.  Does the GC have knowledge of
> pointers on both the stack as well as the heap?

No.  Precise stack and static data segment scanning would be an order of 
magnitude
harder to implement because it would require going deep into compiler hacking.
Precise heap scanning, to the extent that I can get the mask information to the 
GC
somehow, can be implemented by just hacking the runtime.

> > 3.  new only takes RTTI.  It is not a template.  Unless RTTI gets bitmasks
> > in
> > the format I created (which I'll document once I clean things up and
> > release,
> > but has only deviated slightly from what I had talked about here), stuff
> > allocated using it won't be able to take advantage of precise heap
> > scanning.
> > The default bitmask, if none is provided, uses good (bad) old-fashioned
> > conservative scanning unless the entire block has no pointers, in which
> > case
> > it isn't scanned.  This means that we have all the more incentive to
> > replace
> > new with a template of some kind.
> I'm surprised nobody commented on this.  Andrei said Walter decided that new
> shouldn't be a template.  But it seems like a good idea to me.  Templated
> new has received positive feedback from the community, and here is another
> advantage of templated new.
> -Craig

What's the rationale for not templating new?  IMHO it makes a lot of sense b/c
then you have access to all the compile time features of the language while
new'ing stuff, such as the ability to generate bitmasks.

Reply via email to