[Mono-list] What about the new GC?

Marcus mathpup at mylinuxisp.com
Thu Dec 15 18:09:01 EST 2005


I can't answer the question about when Mono will have a precise garbage 
collector, but I think that you might be confusing several issues involving 
garbage collection.

The current Boehm GC is designed so that it will work in environments that 
traditionally do not use garbage collection, such as C++. Similar collectors 
have been used in languages such as Modula-3 that do not have a distinct 
barrier between managed and unmanaged pointers.

During the a garbage collection phase, it is possible to find a "word" that 
that might possibly be a valid pointer into the garbage collected heap. In 
this case, a conservative collection has to assume that it is a valid pointer 
and not free the storage to which the word might point.

When you mentioned not really releasing memory to the OS, that sounds more 
like the problem that the Boehm GC (at least the version used in Mono) does 
not compact the heap. I think that Mono's variant of Boehm does try harder to 
fit objects into exactly the right sized hole, though. But if enough objects 
of just the wrong size are allocated, it's possible to end up an 
ever-expanding, horribly-fragmented heap with lots of unused spaces in the 
middle.

On Thursday 15 December 2005 6:51 am, Hubert FONGARNAND wrote:
> Hi!
>
>     I know that mono uses today a "conservative" garbage collector (it
> means that, the GC doesn't really release the memory to the OS). I've
> read that a new Precise Garbage Collector (maybe the intel's one) would
> be used.
> When do you plan do deploy this new GC? Because today, the same
> application ask more heap memory on mono that on MS.NET (which use a
> precise garbage collector)



More information about the Mono-list mailing list