|how to find gc roots in stack machine? email@example.com (2013-07-01)|
|Re: how to find gc roots in stack machine? firstname.lastname@example.org (Nils M Holm) (2013-07-01)|
|Re: how to find gc roots in stack machine? email@example.com (2013-07-01)|
|Re: how to find gc roots in stack machine? firstname.lastname@example.org (George Neuner) (2013-07-03)|
|Re: how to find gc roots in stack machine? email@example.com (George Neuner) (2013-07-04)|
|Date:||Mon, 1 Jul 2013 05:19:01 -0700 (PDT)|
|Posted-Date:||01 Jul 2013 11:15:36 EDT|
I am writing a simple compiler for a simple stack machine. Now I want
to add a garbage collector. To do this I need a way to be able to find
all roots in the stack at any given time (or at least at some special
points in time). I can see that I would probably be able to generate
some kind of "stack map" that would tell me which variables in the
stack are roots. But I don't know how to deal with the other
intermediate values that are generated on the stack during execution.
I would appreciate any pointers/literature on how to:
1. Find all the roots in the stack, including those that are pushed to the
stack as intermediate results during execution.
2. How to generate stack maps, common formats, etc...
3. How to decide and where to check if gc is necessary.
Thank you very much for any help!
Return to the
Search the comp.compilers archives again.