fix case where we just clean a single atom, the last one.
This commit is contained in:
parent
9d00e3426c
commit
49b3f4e7b6
6
C/grow.c
6
C/grow.c
@ -1393,7 +1393,8 @@ Yap_growheap(int fix_code, UInt in_size, void *cip)
|
|||||||
Yap_atom_gc( PASS_REGS1 );
|
Yap_atom_gc( PASS_REGS1 );
|
||||||
/* check if we have a significant improvement from agc */
|
/* check if we have a significant improvement from agc */
|
||||||
if (n > NOfAtoms+ NOfAtoms/10 ||
|
if (n > NOfAtoms+ NOfAtoms/10 ||
|
||||||
NOfAtoms > 2*AtomHashTableSize) {
|
/* +1 = make sure we didn't lose the current atom */
|
||||||
|
NOfAtoms+1 > 2*AtomHashTableSize) {
|
||||||
res = growatomtable( PASS_REGS1 );
|
res = growatomtable( PASS_REGS1 );
|
||||||
} else {
|
} else {
|
||||||
LOCK(LOCAL_SignalLock);
|
LOCK(LOCAL_SignalLock);
|
||||||
@ -1405,7 +1406,8 @@ Yap_growheap(int fix_code, UInt in_size, void *cip)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
LeaveGrowMode(GrowHeapMode);
|
LeaveGrowMode(GrowHeapMode);
|
||||||
return res;
|
if (res)
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
res=do_growheap(fix_code, in_size, (struct intermediates *)cip, NULL, NULL, NULL PASS_REGS);
|
res=do_growheap(fix_code, in_size, (struct intermediates *)cip, NULL, NULL, NULL PASS_REGS);
|
||||||
LeaveGrowMode(GrowHeapMode);
|
LeaveGrowMode(GrowHeapMode);
|
||||||
|
Reference in New Issue
Block a user