diff --git a/C/alloc.c b/C/alloc.c index b4b895d7c..2d9e9e4dd 100644 --- a/C/alloc.c +++ b/C/alloc.c @@ -12,7 +12,7 @@ * Last rev: * * mods: * * comments: allocating space * -* version:$Id: alloc.c,v 1.14 2002-02-26 15:51:54 vsc Exp $ * +* version:$Id: alloc.c,v 1.15 2002-02-26 16:45:11 stasinos Exp $ * *************************************************************************/ #ifdef SCCS static char SccsId[] = "%W% %G%"; @@ -140,7 +140,7 @@ FreeBlock(BlockHeader *b) /* sanity check */ sp = &(b->b_size) + (b->b_size & ~InUseFlag); - if (Addr(b) <= 0x90c7a24 && sp >= 0x90c7a24) { + if (Addr(b) <= Addr(0x90c7a24) && sp >= (YAP_SEG_SIZE *)0x90c7a24) { extern int do_low_level_trace; fprintf(stderr,"vsc: Here3\n"); } @@ -233,7 +233,8 @@ AllocHeap(unsigned int size) b->b_size |= InUseFlag; UNLOCK(GLOBAL_LOCKS_alloc_block); UNLOCK(FreeBlocksLock); - if (Addr(b) <= 0x90c7a24 && Addr(b)+(size*sizeof(CELL)+sizeof(YAP_SEG_SIZE)) >= 0x90c7a24) + if (Addr(b) <= Addr(0x90c7a24) && + Addr(b)+(size*sizeof(CELL)+sizeof(YAP_SEG_SIZE)) >= Addr(0x90c7a24)) fprintf(stderr,"vsc: Here1\n"); return (Addr(b) + sizeof(YAP_SEG_SIZE)); } @@ -297,7 +298,8 @@ AllocHeap(unsigned int size) if (!HEAPTOP_OWNER(worker_id)) { UNLOCK(HeapTopLock); } - if (Addr(b) <= 0x90c7a24 && Addr(b)+(size*sizeof(CELL)+sizeof(YAP_SEG_SIZE)) >= 0x90c7a24) + if (Addr(b) <= Addr(0x90c7a24) && + Addr(b)+(size*sizeof(CELL)+sizeof(YAP_SEG_SIZE)) >= Addr(0x90c7a24)) fprintf(stderr,"vsc: Here2\nn"); return (Addr(b) + sizeof(YAP_SEG_SIZE)); } diff --git a/C/cdmgr.c b/C/cdmgr.c index fd5e6c4ce..713ec518a 100644 --- a/C/cdmgr.c +++ b/C/cdmgr.c @@ -1876,12 +1876,12 @@ do_toggle_static_predicates_in_use(int mask) YP_fprintf(YP_stderr,"ENV %p %s/%d %s\n", env_ptr, RepAtom(NameOfFunctor(pe->FunctorOfPred))->StrOfAE, pe->ArityOfPE, op_names[op]); else YP_fprintf(YP_stderr,"ENV %p %s %s\n", env_ptr, RepAtom((Atom)(pe->FunctorOfPred))->StrOfAE, op_names[op]); - if (env_ptr == 0x21d0b24) { + if (env_ptr == (CELL *)0x21d0b24) { CELL *next_ee = (CELL *)(env_ptr[E_E]); do { YP_fprintf(YP_stderr,"looking for parent %p with CP %x value %x\n", next_ee, next_ee[E_CP], EnvPreg(next_ee[E_CP])); next_ee = (CELL *)(next_ee[E_E]); - } while (next_ee != 0x21d0f28); + } while (next_ee != (CELL *)0x21d0f28); } mark_pred(mask, pe);