Related articles |
---|
[4 earlier articles] |
Re: Adding garbage collection to C++ fjh@cs.mu.OZ.AU (1992-08-14) |
Re: Adding garbage collection to C++ jos@and.nl (1992-08-14) |
Re: Adding garbage collection to C++ henry@zoo.toronto.edu (1992-08-14) |
Re: Adding garbage collection to C++ bill@amber.ssd.csd.harris.com (1992-08-14) |
Re: Adding garbage collection to C++ pardo@cs.washington.edu (1992-08-15) |
Re: Adding garbage collection to C++ tmb@idiap.ch (1992-08-17) |
Re: Adding garbage collection to C++ tmb@idiap.ch (1992-08-17) |
Re: Adding garbage collection to C++ hudson@cs.umass.edu (1992-08-17) |
Re: Adding garbage collection to C++ fjh@munta.cs.mu.OZ.AU (1992-08-18) |
Re: Adding garbage collection to C++ tmb@arolla.idiap.ch (1992-08-18) |
GC across address spaces (WAS: Adding garbage collection to C++) pardo@cs.washington.edu (1992-08-19) |
Re: Adding garbage collection to C++ tmb@arolla.idiap.ch (1992-08-19) |
Re: Adding garbage collection to C++ maxtal@extro.ucc.su.OZ.AU (1992-08-20) |
[1 later articles] |
Newsgroups: | comp.compilers |
From: | tmb@idiap.ch |
Organization: | IDIAP (Institut Dalle Molle d'Intelligence Artificielle Perceptive) |
Date: | Mon, 17 Aug 1992 16:04:23 GMT |
References: | 92-08-092 92-08-076 |
Keywords: | C, GC |
bill@amber.ssd.csd.harris.com (Bill Leonard) writes:
>[How do you garbage collect multi-threaded programs where some pointers to
>shared memory are kept in per-thread private storage]
> I think you basically have to give up on garbage collecting such strange
> objects. But their existence forces me to advocate that garbage
> collection only happen if I specifically ask for it (thus begging for
> language extensions), rather than automatically.
You don't need a language extension, nor do you need "garbage
collection only [to] happen if [you] specifically ask for it". Simply
retain a pointer to the object in the address space of A. In fact, you
can encapsulate this behavior nicely inside your "send" procedure.
Thomas.
[So how do you ever collect storage that's ever been shared between two
threads? In fairness, this isn't unique to C -- it'd be a problem in any
situation where you have a shared heap with unshared pointers. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.