diff --git a/C/grow.c b/C/grow.c index c4d80a6b4..0c1271372 100644 --- a/C/grow.c +++ b/C/grow.c @@ -944,7 +944,7 @@ execute_growstack(long size0, int from_trail) if (!Yap_ExtendWorkSpace(size)) { /* make sure stacks and trail are contiguous */ - Int minimal_request = AdjustPageSize(((CELL)Yap_TrailTop-(CELL)Yap_GlobalBase)+MinHeapGap+size0); + Int minimal_request = AdjustPageSize(((CELL)Yap_TrailTop-(CELL)Yap_GlobalBase)+4*MinHeapGap+size0); size = Yap_ExtendWorkSpaceThroughHole(minimal_request); if (size < 0) { diff --git a/C/index.c b/C/index.c index b9250aab8..55aab03eb 100644 --- a/C/index.c +++ b/C/index.c @@ -11,8 +11,16 @@ * File: index.c * * comments: Indexing a Prolog predicate * * * -* Last rev: $Date: 2004-08-11 16:14:52 $,$Author: vsc $ * +* Last rev: $Date: 2004-08-27 20:18:52 $,$Author: vsc $ * * $Log: not supported by cvs2svn $ +* Revision 1.95 2004/08/11 16:14:52 vsc +* whole lot of fixes: +* - memory leak in indexing +* - memory management in WIN32 now supports holes +* - extend Yap interface, more support for SWI-Interface +* - new predicate mktime in system +* - buffer console I/O in WIN32 +* * Revision 1.94 2004/07/29 18:15:18 vsc * fix severe bug in indexing of floating point numbers * @@ -137,7 +145,7 @@ cleanup_sw_on_clauses(CELL larg, UInt sz, OPCODE ecls) } } else { return sz; - } + } } } @@ -154,9 +162,7 @@ recover_from_failed_susp_on_cls(struct intermediates *cint, UInt sz) switch(cpc->op) { case jump_v_op: case jump_nv_op: - if (!(cpc->rnd1 & 1)) { - sz = cleanup_sw_on_clauses(cpc->rnd1, sz, ecls); - } + sz = cleanup_sw_on_clauses(cpc->rnd1, sz, ecls); break; case switch_on_type_op: { @@ -198,11 +204,11 @@ recover_from_failed_susp_on_cls(struct intermediates *cint, UInt sz) } if (log_upd_pred) { LogUpdIndex *lcl = ClauseCodeToLogUpdIndex(cpc->rnd2); - sz += sizeof(LogUpdIndex)+cases*sizeof(AtomSwiEntry); + sz += sizeof(LogUpdIndex)+cases*sizeof(FuncSwiEntry); Yap_FreeCodeSpace((char *)lcl); } else { StaticIndex *scl = ClauseCodeToStaticIndex(cpc->rnd2); - sz += sizeof(StaticIndex)+cases*sizeof(AtomSwiEntry); + sz += sizeof(StaticIndex)+cases*sizeof(FuncSwiEntry); Yap_FreeCodeSpace((char *)scl); } } diff --git a/C/tracer.c b/C/tracer.c index fa3fb0933..413f95013 100644 --- a/C/tracer.c +++ b/C/tracer.c @@ -108,7 +108,8 @@ check_trail_consistency(void) { CELL old_value = 0L, old_value2 = 0L; -void jmp_deb(int i) {if (i) printf("Here we go\n"); else jmp_deb(0);} +static void +jmp_deb(int i) {if (i) printf("Here we go\n"); else jmp_deb(0);} void low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args) diff --git a/H/iopreds.h b/H/iopreds.h index 00735d383..7d240eb6d 100644 --- a/H/iopreds.h +++ b/H/iopreds.h @@ -78,7 +78,7 @@ StreamDesc; #define YAP_ERROR NIL -#define MaxStreams 32 +#define MaxStreams 64 #define Free_Stream_f 0x000001 #define Output_Stream_f 0x000002