you may have code and dbrefs at the same time.

try to expand trail in single sweep


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@769 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2003-02-12 13:20:52 +00:00
parent 8c2af87600
commit b37ee94fe9
8 changed files with 70 additions and 53 deletions

View File

@@ -1017,7 +1017,11 @@ SearchForTrailFault(void)
#if OS_HANDLES_TR_OVERFLOW
if ((TR > (tr_fr_ptr)Yap_TrailTop-1024 &&
TR < (tr_fr_ptr)Yap_TrailTop+(64*1024))|| Yap_DBTrailOverflow()) {
if (!Yap_growtrail(64 * 1024L)) {
long trsize = 64*2014L;
while (trsize < ((CELL)TR-(CELL)Yap_TrailTop)) {
trsize += 64*2014L;
}
if (!Yap_growtrail(trsize)) {
Yap_Error(SYSTEM_ERROR, TermNil, "YAP failed to reserve %ld bytes in growtrail", 64*1024L);
}
/* just in case, make sure the OS keeps the signal handler. */