[Mono-devel-list] Garbage Collection problem

Michal Moskal malekith at pld-linux.org
Wed Oct 1 06:51:25 EDT 2003


On Wed, Oct 01, 2003 at 10:00:15AM +0200, Jörg Rosenkranz wrote:
> The Mono GC can never release the unused memory to the OS
> until all blocks after the unused region are collected by
> the GC too.
> 
> I think this is a design problem of the GC used by Mono.

Mono uses Boehm GC, that is *conservative*, i.e. it can never tell if
given data is integer or a pointer. Which means it cannot touch pointers
(since they could be integers). And hence it cannot move data around.
On the plus side -- it can be used to garbage collect C, or any other
machine code, as long as it doesn't store pointers in external memory.
OTOH it is possible to have precise garbage collection in .NET, but it's
a lot harder.

-- 
: Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv
: When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h




More information about the Mono-devel-list mailing list