Florian Weimer <f...@deneb.enyo.de> writes: > * Ian Lance Taylor: > >> The Go frontend was approved for inclusion with gcc by the steering >> committee a while back: http://gcc.gnu.org/ml/gcc/2010-01/msg00500.html . > > How general is the garbage collector and its support infrastructure in > the compiler? AFAICS, it's precise, unlike the Boehm/Dehmers/Weiser > collector used by the Java front end.
The garbage collector is a work in progress. What I say here is how it works at present, but everything will change in some as yet undetermined manner. At the moment the only compiler support for the garbage collector is that some allocations are marked as not containing pointers. Those blocks are ignored when scanning. When scanning memory blocks which may contain pointers, which includes the stack, the scanning is conservative: an integer value which happens to look like a pointer will cause the block to which it points to be marked as live. Ian