ask for space proportional to the free trail space at trail overflow.

This commit is contained in:
Vitor Santos Costa 2009-12-21 10:26:00 -02:00
parent 6d1eec34db
commit ab0913a2df

View File

@ -3372,7 +3372,7 @@ Yap_cclause(volatile Term inp_clause, int NOfArgs, Term mod, volatile Term src)
ARG1 = inp_clause;
ARG3 = src;
YAPLeaveCriticalSection();
if (!Yap_growtrail(0L, FALSE)) {
if (!Yap_growtrail(Yap_TrailTop-(ADDR)TR, FALSE)) {
Yap_Error_TYPE = OUT_OF_TRAIL_ERROR;
Yap_Error_Term = inp_clause;
return NULL;