fix garbage collector for deterministic tabling (still very

experimental)
This commit is contained in:
Ricardo Rocha 2009-08-08 05:02:27 +01:00
parent 4bdf8bf991
commit 4f6676e5af
2 changed files with 12 additions and 6 deletions

View File

@ -1914,7 +1914,10 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose)
current_B = gc_B; current_B = gc_B;
prev_HB = HB; prev_HB = HB;
#endif #endif
HB = gc_B->cp_h; #ifdef DETERMINISTIC_TABLING
if (!IS_DET_GEN_CP(gc_B))
#endif /* DETERMINISTIC_TABLING */
HB = gc_B->cp_h;
#ifdef INSTRUMENT_GC #ifdef INSTRUMENT_GC
num_bs++; num_bs++;
#endif #endif
@ -1957,6 +1960,9 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose)
} }
#endif #endif
} }
#ifdef DETERMINISTIC_TABLING
if (!IS_DET_GEN_CP(gc_B))
#endif /* DETERMINISTIC_TABLING */
{ {
/* find out how many cells are still alive in the trail */ /* find out how many cells are still alive in the trail */
mark_trail(saved_TR, gc_B->cp_tr, gc_B->cp_h, gc_B); mark_trail(saved_TR, gc_B->cp_tr, gc_B->cp_h, gc_B);

View File

@ -49,11 +49,6 @@
** ----------------------------------------------- */ ** ----------------------------------------------- */
#define TABLING_EARLY_COMPLETION 1 #define TABLING_EARLY_COMPLETION 1
/* --------------------------------------------------- **
** support deterministic tabling? (optional) **
** --------------------------------------------------- */
/* #define DETERMINISTIC_TABLING 1 */
/* ------------------------------------------------ ** /* ------------------------------------------------ **
** limit the table space size? (optional) ** ** limit the table space size? (optional) **
** ------------------------------------------------ */ ** ------------------------------------------------ */
@ -64,6 +59,11 @@
** ------------------------------------------------ */ ** ------------------------------------------------ */
/* #define INCOMPLETE_TABLING 1 */ /* #define INCOMPLETE_TABLING 1 */
/* --------------------------------------------------- **
** support deterministic tabling? (optional) **
** --------------------------------------------------- */
/* #define DETERMINISTIC_TABLING 1 */
/* ---------------------------------------- -- ** /* ---------------------------------------- -- **
** enable error checking? (optional) ** ** enable error checking? (optional) **
** ------------------------------------------- */ ** ------------------------------------------- */