(Semi) precise GC [was: Re: Std Phobos 2 and logging library?]
Leandro Lucarella
llucax at gmail.com
Mon Apr 13 13:07:26 PDT 2009
Frits van Bommel, el 13 de abril a las 20:33 me escribiste:
> >But right now gc_malloc() doesn't take any TypeInfo argument. I can't see
> >where I can get the TypeInfo in the first place =/
>
> Ah, you're right. But if you'll look at your nearest lifetime.d[1]
> you'll see that all the allocation routines called by the compiler *do*
> provide a TypeInfo, so apparently it's just not propagated to gc_*. So
> I guess the first thing to do would be to either
> (a) change the signature of gc_{malloc,calloc,extend}()
> or
> (b) add something like gc_settype(void*, TypeInfo)...
Ok, these are great news! I will certainly experiment with this change to
achieve a more precise heap!
> [1]: Tango name, and presumably druntime as well; I think it's spread
> all over the place for Phobos 1.
Great, I will stick to Tango for now because:
a) Is more likely to accept changes (because of the "stable D1" policy of
Walter).
b) I'm using LDC, and there is no Phobos support for LDC right now (I
guess you know that ;)
c) It's more likely to be (forward) compatible with druntime, and thus,
D2.
--
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
More information about the Digitalmars-d
mailing list