Conspiracy Theory #1

Leandro Lucarella llucax at gmail.com
Fri Nov 20 16:56:28 PST 2009


Travis Boucher, el 20 de noviembre a las 16:45 me escribiste:
> Leandro Lucarella wrote:
> >dsimcha, el 20 de noviembre a las 16:24 me escribiste:
> >>>>Right, but they can still be the target of false pointers.  In this case, false
> >>>>pointers keep each instance of foo[] alive, leading to severe memory leaks.
> >>>But the issue is more of a GC implementation issue then a language
> >>>issue, correct?
> >>Yes.
> >>
> >>>Or is this an issue of all lower level language garbage
> >>>collectors?
> >>Kinda sorta.  It's possible, but not easy, to implement fully precise GC (except
> >>for the extreme corner case of unions of reference and non-reference types) in a
> >>close to the metal, statically compiled language.
> >
> >I don't think so if you want to be able to link to C code, unless I'm
> >missing something...
> >
> 
> The extern (C) stuff and malloc allocated memory isn't garbage collected.

I know, but the stack is used as a root of the live data, and if you use
C code, you will have frames without type information. So you will never
get full a full precise root set, unless you find some way to separate the
D stack from the C stack and completely ignore the C stack. Again, unless
I'm missing something :)

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
- Mire, don Inodoro! Una paloma con un anillo en la pata! Debe ser
  mensajera y cayó aquí!
- Y... si no es mensajera es coqueta... o casada.
	-- Mendieta e Inodoro Pereyra



More information about the Digitalmars-d mailing list