🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #744

Re: The Effect of the Cut on Prolog Stack

#744
From: Roland Karlsson
Date: Sat, 29 Aug 1992 14:21
19 lines
1071 bytes
The cut operation in the WAM implementation of Prolog does not in it
self reduce the amount of used global stack.  But a garbage collection
does reclaim the space.

so
...  test,!,garbage_collect,test ...

is a way (in SICStus) to just use X global stack space.

(It is not always true.  Undo, setarg .. etc can make it hard to
reclaim everything.)


Roland Karlsson
--
Roland Karlsson             SICS, PO Box 1263, S-164 28 KISTA, SWEDEN
Internet: roland@sics.se    Tel: +46 8 752 15 40          Fax: +46 8 751 72 30
Telex: 812 6154 7011 SICS   Ttx: 2401-812 6154 7011=SICS
Technical Details
Message-ID: <ROLAND.92Aug29152131@helicon.sics.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!sics.se!roland
References: <BtnvKp.4nD@ecf.toronto.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.prolog
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!sics.se!roland
From: roland@sics.se (Roland Karlsson)
Subject: Re: The Effect of the Cut on Prolog Stack
In-Reply-To: reidld@ecf.toronto.edu's message of Thu, 27 Aug 1992 21:26:49 GMT
Message-ID: <ROLAND.92Aug29152131@helicon.sics.se>
Sender: news@sics.se
Organization: Swedish Institute of Computer Science, Kista
References: <BtnvKp.4nD@ecf.toronto.edu>
Date: Sat, 29 Aug 1992 14:21:31 GMT
Lines: 19