Article View: comp.lang.prolog
Article #89Re: Unsafe variables
From: Mats Carlsson
Date: Wed, 12 Aug 1992 10:31
Date: Wed, 12 Aug 1992 10:31
35 lines
1599 bytes
1599 bytes
In article <1992Aug7.155554.9342@cs.kuleuven.ac.be> bimbart@cs.kuleuven.ac.be (Bart Demoen) writes:
[...]
Garbage collection has to deal with 3 types of permanent variables
initialized and active (1)
initialized and no longer active (2)
not yet initialized (3)
[...]
(1) poses no problem
There are at least three ways to take care of (3):
1. at the first call, initialize the ones that are not yet active;
it is the SICStus solution Mats described
As I pointed out in my message, initializing the not yet active ones is
not quite enough.
[...]
(2) is dealt with in systems with trimming by making the length of the
environment somehow available to the gc process, often by storing
this length in *(CP-1)
SICStus does not trim environments, so perhaps it doesn't collect all garbage ?
All versions of SICStus Prolog do trim environments as in the original
WAM definition.
--
Mats Carlsson
SICS, PO Box 1263, S-164 28 KISTA, Sweden Internet: matsc@sics.se
Tel: +46 8 7521543 Ttx: 812 6154 7010 SICS Fax: +46 8 7517230
Technical Details
Message-ID:
<1992Aug12.103114.18934@sics.se>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!sics.se!sics.se!matscReferences:
<1992Aug7.155554.9342@cs.kuleuven.ac.be>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.prolog Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!sics.se!sics.se!matsc From: matsc@sics.se (Mats Carlsson) Subject: Re: Unsafe variables In-Reply-To: bimbart@cs.kuleuven.ac.be's message of Fri, 7 Aug 1992 15:55:54 GMT Message-ID: <1992Aug12.103114.18934@sics.se> Sender: news@sics.se Organization: Swedish Institute of Computer Science, Kista References: <1992Aug7.155554.9342@cs.kuleuven.ac.be> Date: Wed, 12 Aug 1992 10:31:14 GMT Lines: 35