don't give up if you don't have enough space to expand the consult stack.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@390 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
499adf4cf4
commit
ec2e474e5c
@ -715,11 +715,12 @@ static void expand_consult(void)
|
||||
/* now double consult capacity */
|
||||
ConsultCapacity += InitialConsultCapacity;
|
||||
/* I assume it always works ;-) */
|
||||
new_cl = (consult_obj *)AllocCodeSpace(sizeof(consult_obj)*ConsultCapacity);
|
||||
if (new_cl == NULL) {
|
||||
while ((new_cl = (consult_obj *)AllocCodeSpace(sizeof(consult_obj)*ConsultCapacity)) == NULL) {
|
||||
if (!growheap(FALSE)) {
|
||||
Error(SYSTEM_ERROR,TermNil,"Could not expand consult space: Heap crashed against Stacks");
|
||||
return;
|
||||
}
|
||||
}
|
||||
new_cs = new_cl + (InitialConsultCapacity+1);
|
||||
new_cb = new_cs + (ConsultBase-ConsultSp);
|
||||
/* start copying */
|
||||
|
Reference in New Issue
Block a user