home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sunic!dkuug!uts!id.dth.dk!sestoft
- From: sestoft@id.dth.dk (Peter Sestoft (EMP))
- Newsgroups: comp.lang.functional
- Subject: Re: Q: garbage collection in Miranda
- Keywords: garbage collection Miranda
- Message-ID: <sestoft.724491169@id.dth.dk>
- Date: 16 Dec 92 07:32:49 GMT
- References: <AOT9CLP@math.fu-berlin.de>
- Sender: news@id.dth.dk (USENET News System)
- Organization: Department of Computer Science
- Lines: 33
-
- doerr@inf.fu-berlin.de (Heiko Doerr) writes:
-
- >While looking for data structures to store states of a computation
- >the following questions arose concerning the garbage collector of
- >Miranda. ...
-
- >2) Is the garbage collector non-deterministic or can the following effect
- >be predicted?
- >
- >Once you evaluate the expressions "#(list 50000)" and "#[0..50000]"
- >several times you will notice that the evaluation does not succeed all
- >the times. Could anybody tell me whether and if so how the garbage
- >collector is related to the operating system to explain this
- >non-deterministic behaviour.
-
- My experience from 2 years ago suggests that it is rather
- nondeterministic (in the SUN 4 version, at any rate). Maybe the
- garbage collector looks at the (C?) stack and conservatively assumes
- every word found there to be a heap pointer. If some of those words
- are not heap pointers but integers, arbitrary amounts of garbage will
- not be collected. Note that this is safe, but quite confusing for the
- functional programmer whose program uses widely varying amounts of
- storage.
-
- >These runs were executed on SUN-4 with 16 MB and Miranda version 2.014.
-
- Try the VAX implementation.
-
- Peter (almost merely guessing --- I can't find the relevant notes)
- --
- Peter Sestoft * sestoft@id.dth.dk * Department of Computer Science
- Technical University of Denmark, Building 344 DK-2800 Lyngby, Denmark
- Tel: +45 45 93 33 32 * Direct: +45 45 93 12 22/3749 * Fax: +45 42 88 45 30
-