How Garbage Collector works?

Leandro Lucarella luca at llucax.com.ar
Thu Aug 12 07:10:25 PDT 2010


Nick Sabalausky, el 12 de agosto a las 01:00 me escribiste:
> "Borneq" <borneq at antyspam.hidden.pl> wrote in message 
> news:i3vt2q$285d$1 at digitalmars.com...
> > Unlike Java, in D there are pointers and structs. Did not prevent it from 
> > operation of Garbage Collector? Where is described garbage collection 
> > algorithm ?
> 
> Most things that are frequently believed to require a sandboxed VM langauge 
> like the JVM are misconceptions. There's nothing about pointers that 
> prevents garbage collection. The pointers do cause some complication, 
> though. For instance, D's GC is a conservative one, and therefore is prone 
> to false pointers occasionally preventing an object from being collected.

Conservativeness have nothing to do with pointers, and actually *all* GC
deal with pointers, is all the GC does, follow pointers to see what
chunks of memory are alive :)

There is a patch[1] to make D support semi-precise GC (only the heap
have type information).

[1] http://d.puremagic.com/issues/show_bug.cgi?id=3463

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
PROTESTA EN PLAZA DE MAYO: MUSICO SE COSIO LA BOCA
	-- Crónica TV


More information about the Digitalmars-d mailing list