fix bug where integers might be made up atoms (within gc).

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1473 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2005-12-03 03:03:18 +00:00
parent 4157f2ce61
commit 868f236185

View File

@ -33,6 +33,7 @@ static char SccsId[] = "%W% %G%";
/* global variables for garbage collection */
#if !defined(YAPOR) && !defined(THREADS)
/* in a single gc */
static unsigned long int total_marked, total_oldies; /* number of heap objects marked */
@ -41,9 +42,7 @@ static unsigned long int total_marked, total_oldies; /* number of heap objects
static unsigned long int total_smarked;
#endif
#endif
STATIC_PROTO(Int p_inform_gc, (void));
STATIC_PROTO(Int p_gc, (void));
#endif /* !defined(YAPOR) && !defined(THREADS) */
#ifdef EASY_SHUNTING
static choiceptr current_B;
@ -57,6 +56,8 @@ static tr_fr_ptr new_TR;
static CELL *HGEN;
STATIC_PROTO(Int p_inform_gc, (void));
STATIC_PROTO(Int p_gc, (void));
STATIC_PROTO(void push_registers, (Int, yamop *));
STATIC_PROTO(void marking_phase, (tr_fr_ptr, CELL *, yamop *, CELL *));
STATIC_PROTO(void compaction_phase, (tr_fr_ptr, CELL *, yamop *, CELL *));
@ -3091,7 +3092,8 @@ compact_heap(void)
update_relocation_chain(current, dest);
ccur = *current;
next = GET_NEXT(ccur);
if (next < H && /* move current cell &
if (HEAP_PTR(ccur) &&
(next = GET_NEXT(ccur)) < H && /* move current cell &
* push */
next > current) { /* into relocation chain */
*dest = ccur;