Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #935
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: how to find gc roots in stack machine? |
| Date | 2013-07-01 15:54 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <13-07-004@comp.compilers> (permalink) |
| References | <13-07-002@comp.compilers> |
n.oje.bar@gmail.com writes: >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). Since you want it simple, my recommendation is one of: A) Use a conservative GC (e.g., Boehm's). B) Use a separate stack for pointers. Then you know that everything on that stack is a root (or null), and everything on the other stack is not. You still have complexity to identify roots in memory; so my overall recommendation is A. - anton -- M. Anton Ertl anton@mips.complang.tuwien.ac.at http://www.complang.tuwien.ac.at/anton/
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to find gc roots in stack machine? n.oje.bar@gmail.com - 2013-07-01 05:19 -0700 Re: how to find gc roots in stack machine? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-07-01 15:54 +0000 Re: how to find gc roots in stack machine? George Neuner <gneuner2@comcast.net> - 2013-07-03 03:56 -0400
csiph-web