From yan.guiborat@caramail.com Thu Jan 31 10:33:09 2002
Received: from mail3.caramail.com (mail3.caramail.com [195.68.99.191])
	by swi.psy.uva.nl (8.11.6/8.11.2) with ESMTP id g0V9X9L06545
	for <prolog@swi.psy.uva.nl>; Thu, 31 Jan 2002 10:33:09 +0100 (MET)
Received: from caramail.com (www37.caramail.com [195.68.99.216])
	by mail3.caramail.com (8.8.8/8.8.8) with SMTP id KAA03718
	for prolog@swi.psy.uva.nl; Thu, 31 Jan 2002 10:33:08 +0100 (MET)
Posted-Date: Thu, 31 Jan 2002 10:33:08 +0100 (MET)
From: Yan Guiborat <yan.guiborat@caramail.com>
To: prolog@swi.psy.uva.nl
Message-ID: <1012469588000911@caramail.com>
X-Mailer: Caramail - www.caramail.com
X-Originating-IP: [212.157.192.147]
Mime-Version: 1.0
Date: Thu, 31 Jan 2002 10:33:08 GMT+1
Content-Type: multipart/mixed; boundary="=_NextPart_Caramail_0009111012469588_ID"
Subject: [SWIPL] Querying PL from C, under Freebsd.

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--=_NextPart_Caramail_0009111012469588_ID
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I am facing a problem that I really don't know how to solve 
fast, may be one could help, it would be great thanks.
I was calling PL from C, under freeBSD in a usual way 
looking like this.

term_t a0;
predicate_t p;
qid_t q;

a0 =3D PL_new_term_ref();
.....
....

when I tested my application, it stucks, and if I don't 
stop it fast enougth, it makes my pager process complain 
strongly, and them kill the app and core it.
I found that the problem was coming from the term 
allocation ( a0 =3D PL_new_term_ref() ), and when I checked 
in SwiPL doc, I found this :
"
term_t PL_new_term_ref()
Return a fresh reference to a term. The reference is 
allocated on the local stack. Allocating a term-reference 
may trigger a stack-shift on machines that cannot use 
sparse-memory management for allocation the Prolog stacks. 
The returned reference describes a variable. 
"
I though so that my freebsd (4.0) cannot use sparse memory 
management...is there a way to solve this problem, or do I 
have to implement a sparse memory management or forget 
about working under BSD (very sad).

To any future help, thanks.
Yan.
_________________________________________________________
Le journal des abonn=E9s Caramail - http://www.carazine.com


--=_NextPart_Caramail_0009111012469588_ID--

