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:
parent
64b01a75c1
commit
803a4b04eb
2
C/grow.c
2
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) {
|
||||
|
18
C/index.c
18
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
|
||||
*
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user