[Mono-list] mono-0.28/libgc/misc.c:GC_clear_stack_inner comments, please
Michal Moskal
malekith@pld-linux.org
Sun, 26 Oct 2003 11:03:35 +0100
On Sun, Oct 26, 2003 at 09:28:45AM +1100, Peter Kostouros wrote:
> I wonder if I can get some input from the following snippet of code
> (mono-0.28/libgc/misc.c:GC_clear_stack_inner). What is the essence of
> this function?
GC looks for roots (i.e. pointers it starts looking for live data from)
in various places, mostly the stack and registered global variables.
When C function finishes, it can leave bunch of pointers on the stack.
All that stuff is considered live data by the GC, which makes it leave
more garbage around. My guess about this function, is that it tries to
clear stack out of pointers.
> Mono applications abnormally terminate upon completion:
> perhaps something going wrong with recursion?
Perhaps the limit variable is set wrong, and this function hits the
OS limit?
--
: 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