From jan@swi.psy.uva.nl Mon May  7 21:00:36 2001
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f47J0a303769;
	Mon, 7 May 2001 21:00:36 +0200 (MET DST)
Received: (from jan@localhost)
	by gollem.swi.psy.uva.nl (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f47J0aq20479;
	Mon, 7 May 2001 21:00:36 +0200
Date: Mon, 7 May 2001 21:00:36 +0200
Message-Id: <200105071900.f47J0aq20479@gollem.swi.psy.uva.nl>
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Subject: Re: [SWIPL] Preliminary question
To: =?koi8-r?B?7snLz8zByiDmxcTP0s/X?= <_nicki@mail.ru>,
   "Jan Wielemaker" <prolog@swi.psy.uva.nl>
In-Reply-To: =?koi8-r?B?7snLz8zByiDmxcTP0s/X?='s message of Mon, 7 May 2001 22:13:59 +0400
Phone: +31 - 20 - 525 6121

> Hi. Excuse for my english.
> 
> 1. How can I realize peak amount of memory that prolog occupies while it
> thinking about my question?

There is no way to find out right now.  It is difficult too.  Depending
on the stack limit, the system uses different timing for scheduling 
garbage collection.

> 2. Is there any correlaion between _GXXXXXXXXXXXX reported by tracer(or
> while tracing) and amount of memory mentioned above?

Yip.  A variable named _GXXX is located 4*XXX bytes from the base of the
stack (8*XXX on 64-bit machines, etc.).  See also statistics/2.

> 3. Is there any limitations of prolog answers if I'll try to use it through
> C-interface (suppose answer will be relatively big, how about kilobytes)?

The C-interface poses no additional limits except for available memory.
Except for some conversions to char *, the C-interface doesn't claim
much memory.  Each allocated term_t requires 1 word (4 bytes on 32-bit
machines) on the local stack.

	--- Jan
	

