From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f891f,14f3fa9fb2c63b2d X-Google-Attributes: gidf891f,public X-Google-Thread: fac41,98945d3dc397bdb1 X-Google-Attributes: gidfac41,public X-Google-Thread: f678f,14f3fa9fb2c63b2d X-Google-Attributes: gidf678f,public X-Google-Thread: f4fd2,98945d3dc397bdb1 X-Google-Attributes: gidf4fd2,public X-Google-Thread: 102b75,14f3fa9fb2c63b2d X-Google-Attributes: gid102b75,public X-Google-Thread: f4ea4,98945d3dc397bdb1 X-Google-Attributes: gidf4ea4,public X-Google-ArrivalTime: 1993-12-13 19:13:49 PST Xref: gmd.de comp.lang.misc:5271 comp.arch:18130 comp.unix.osf.misc:828 comp.lang.dylan:1568 comp.lang.eiffel:2110 comp.lang.lisp:5050 Path: gmd.de!xlink.net!howland.reston.ans.net!cs.utexas.edu!sdd.hp.com!decwrl!parc!boehm From: boehm@parc.xerox.com (Hans Boehm) Newsgroups: comp.lang.misc,comp.arch,comp.unix.osf.misc,comp.lang.dylan,comp.lang.eiffel,comp.lang.lisp Subject: Re: ANDF - some information (GC really) Date: 13 Dec 1993 20:01:00 GMT Organization: Xerox Palo Alto Research Center Message-ID: <2eihls$pdt@news.parc.xerox.com> References: <1993Dec2.134838.8047@webo.dg.com> <2e9sel$2in@disun41.epfl.ch> <2eakvr$is4@news.parc.xerox.com> NNTP-Posting-Host: siria.parc.xerox.com lgm@polaris.flw.att.com (Lawrence G. Mayka) writes: >In article <2eakvr$is4@news.parc.xerox.com> boehm@parc.xerox.com (Hans Boehm) writes: > I think sml2c is in the minority here. By doing this, it gets space > usage guarantees that are stronger than those provided by almost all > other language implementations, and it can probably afford to be > a bit sloppier about allocating short-lived objects. If you are willing > to settle for the customary lack of guarantees (as with all C or Lisp > implementations that I know of), you can conservatively scan the stack > for bit patterns that look like pointers. This is done by the SRC > Modula-3 compiler, the Sather compiler, AKCL, Bartlett's Scheme > compiler, etc., and even by some compilers that generate native code > (e.g. D-machine Cedar, and SRC Modula-2+, I believe.) >You seem to focus on languages that are statically typed, >implementations that are noncommercial, or implementations that >generate C code. It is quite natural for these to scan stacks for >pointer-like bit patterns. Indeed, they typically have no viable and >cost-effective alternative. >On the other hand, you don't mention Common Lisp implementations >specifically except for AKCL (which is noncommercial and generates C >code). Are you certain that Harlequin, Franz, Lucid, Symbolics, >Venue, Apple, Gold Hill, CMU, and CLISP actually employ bit-pattern >scanning for their stacks? I believe that commercial Lisp systems generally do NOT use conservative stack scanning. I did not mean to imply that they did. I did mean to say that, as far as I know, they do not provide any space usage guarantees. If they were to do so, they would first have to define which Lisp objects are accessible at what time. I know of no such definition. And a compiler would have to go through some effort, and forego some optimizations, in order to adhere to such a definition. The problem for C is different. The notion of live heap storage is well-defined (malloc'ed but not free'd). But for n live bytes, the worst-case heap size is at least proportional to n*log n, and perhaps n * n. (The latter class of algoruthms may be better in practice.) Except perhaps for Paul Wilson's garbage collected implementation, I know of no malloc implementation that even specifies where it falls. And neither guarantee is likely to be useful. I would argue that in either case, you don't get usefully better space guarantees than with a conservative collector. (Expected performance is a more complicated issue that will depend on the application, etc. And this isn't the right discussion for that.) Hans-J. Boehm (boehm@parc.xerox.com) Standard disclaimer ...