more small fixes

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1119 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2004-08-27 20:18:52 +00:00
parent 64b01a75c1
commit 803a4b04eb
4 changed files with 17 additions and 10 deletions

View File

@ -944,7 +944,7 @@ execute_growstack(long size0, int from_trail)
if (!Yap_ExtendWorkSpace(size)) { if (!Yap_ExtendWorkSpace(size)) {
/* make sure stacks and trail are contiguous */ /* 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); size = Yap_ExtendWorkSpaceThroughHole(minimal_request);
if (size < 0) { if (size < 0) {

View File

@ -11,8 +11,16 @@
* File: index.c * * File: index.c *
* comments: Indexing a Prolog predicate * * 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 $ * $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 * Revision 1.94 2004/07/29 18:15:18 vsc
* fix severe bug in indexing of floating point numbers * fix severe bug in indexing of floating point numbers
* *
@ -154,9 +162,7 @@ recover_from_failed_susp_on_cls(struct intermediates *cint, UInt sz)
switch(cpc->op) { switch(cpc->op) {
case jump_v_op: case jump_v_op:
case jump_nv_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; break;
case switch_on_type_op: case switch_on_type_op:
{ {
@ -198,11 +204,11 @@ recover_from_failed_susp_on_cls(struct intermediates *cint, UInt sz)
} }
if (log_upd_pred) { if (log_upd_pred) {
LogUpdIndex *lcl = ClauseCodeToLogUpdIndex(cpc->rnd2); LogUpdIndex *lcl = ClauseCodeToLogUpdIndex(cpc->rnd2);
sz += sizeof(LogUpdIndex)+cases*sizeof(AtomSwiEntry); sz += sizeof(LogUpdIndex)+cases*sizeof(FuncSwiEntry);
Yap_FreeCodeSpace((char *)lcl); Yap_FreeCodeSpace((char *)lcl);
} else { } else {
StaticIndex *scl = ClauseCodeToStaticIndex(cpc->rnd2); StaticIndex *scl = ClauseCodeToStaticIndex(cpc->rnd2);
sz += sizeof(StaticIndex)+cases*sizeof(AtomSwiEntry); sz += sizeof(StaticIndex)+cases*sizeof(FuncSwiEntry);
Yap_FreeCodeSpace((char *)scl); Yap_FreeCodeSpace((char *)scl);
} }
} }

View File

@ -108,7 +108,8 @@ check_trail_consistency(void) {
CELL old_value = 0L, old_value2 = 0L; 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 void
low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args) low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)

View File

@ -78,7 +78,7 @@ StreamDesc;
#define YAP_ERROR NIL #define YAP_ERROR NIL
#define MaxStreams 32 #define MaxStreams 64
#define Free_Stream_f 0x000001 #define Free_Stream_f 0x000001
#define Output_Stream_f 0x000002 #define Output_Stream_f 0x000002