diff --git a/C/agc.c b/C/agc.c index f71d23dc9..763d1bf5b 100755 --- a/C/agc.c +++ b/C/agc.c @@ -463,7 +463,6 @@ atom_gc(USES_REGS1) mark_stacks(PASS_REGS1); restore_codes(); clean_atoms(); - GLOBAL_AGcLastCall = NOfAtoms; YAPLeaveCriticalSection(); agc_time = Yap_cputime()-time_start; tot_agc_time += agc_time; diff --git a/H/dglobals.h b/H/dglobals.h index c3b5a7d07..364aeff13 100644 --- a/H/dglobals.h +++ b/H/dglobals.h @@ -33,8 +33,6 @@ #define GLOBAL_AllowTrailExpansion Yap_global->allow_trail_expansion #define GLOBAL_SizeOfOverflow Yap_global->size_of_overflow -#define GLOBAL_AGcLastCall Yap_global->agc_last_call - #define GLOBAL_AGcThreshold Yap_global->agc_threshold #define GLOBAL_AGCHook Yap_global->agc_hook diff --git a/H/hglobals.h b/H/hglobals.h index e89ead5f1..623e9dc01 100644 --- a/H/hglobals.h +++ b/H/hglobals.h @@ -33,8 +33,6 @@ typedef struct global_data { int allow_trail_expansion; UInt size_of_overflow; - UInt agc_last_call; - UInt agc_threshold; Agc_hook agc_hook; diff --git a/H/iglobals.h b/H/iglobals.h index df32d43e2..c5111b0ec 100644 --- a/H/iglobals.h +++ b/H/iglobals.h @@ -33,8 +33,6 @@ static void InitGlobal(void) { GLOBAL_AllowTrailExpansion = TRUE; GLOBAL_SizeOfOverflow = 0; - GLOBAL_AGcLastCall = 0; - GLOBAL_AGcThreshold = 10000; GLOBAL_AGCHook = NULL; diff --git a/H/rglobals.h b/H/rglobals.h index 054db7250..b70bf1bca 100644 --- a/H/rglobals.h +++ b/H/rglobals.h @@ -36,8 +36,6 @@ static void RestoreGlobal(void) { - - #if THREADS diff --git a/OPTYap/opt.init.c b/OPTYap/opt.init.c index c70e12559..2ac50e796 100644 --- a/OPTYap/opt.init.c +++ b/OPTYap/opt.init.c @@ -143,7 +143,7 @@ void Yap_init_global_optyap_data(int max_table_size, int n_workers, int sch_loop #ifdef LIMIT_TABLING GLOBAL_first_sg_fr = NULL; GLOBAL_last_sg_fr = NULL; - GLOBAL_last_sg_fr = NULL; + GLOBAL_check_sg_fr = NULL; #endif /* LIMIT_TABLING */ new_dependency_frame(GLOBAL_root_dep_fr, FALSE, NULL, NULL, NULL, NULL, NULL); for (i = 0; i < MAX_TABLE_VARS; i++) { diff --git a/OPTYap/opt.macros.h b/OPTYap/opt.macros.h index 5f51a56c4..a37814923 100644 --- a/OPTYap/opt.macros.h +++ b/OPTYap/opt.macros.h @@ -162,7 +162,7 @@ extern int Yap_page_size; } #define RECOVER_UNUSED_SPACE(STR_PAGES) \ - { sg_fr_ptr sg_fr = Yap_check_sg_fr; \ + { sg_fr_ptr sg_fr = GLOBAL_check_sg_fr; \ do { \ if (sg_fr) \ sg_fr = SgFr_next(sg_fr); \ @@ -186,7 +186,7 @@ extern int Yap_page_size; TrNode_child(SgFr_answer_trie(sg_fr)) = NULL; \ } \ } while (Pg_free_pg(GLOBAL_pages_void) == Pg_free_pg(STR_PAGES)); \ - Yap_check_sg_fr = sg_fr; \ + GLOBAL_check_sg_fr = sg_fr; \ } #define ALLOC_STRUCT(STR, STR_PAGES, STR_TYPE) \ diff --git a/OPTYap/opt.structs.h b/OPTYap/opt.structs.h index b3d9a5551..e45b9879d 100644 --- a/OPTYap/opt.structs.h +++ b/OPTYap/opt.structs.h @@ -284,7 +284,7 @@ struct global_optyap_data { #define GLOBAL_root_tab_ent (Yap_optyap_data.root_table_entry) #define GLOBAL_first_sg_fr (Yap_optyap_data.first_subgoal_frame) #define GLOBAL_last_sg_fr (Yap_optyap_data.last_subgoal_frame) -#define GLOBAL_last_sg_fr (Yap_optyap_data.check_subgoal_frame) +#define GLOBAL_check_sg_fr (Yap_optyap_data.check_subgoal_frame) #define GLOBAL_root_dep_fr (Yap_optyap_data.root_dependency_frame) #define GLOBAL_table_var_enumerator(index) (Yap_optyap_data.table_var_enumerator[index]) #define GLOBAL_table_var_enumerator_addr(index) (Yap_optyap_data.table_var_enumerator + (index)) diff --git a/OPTYap/tab.macros.h b/OPTYap/tab.macros.h index 9db5bce68..06cc3f13e 100644 --- a/OPTYap/tab.macros.h +++ b/OPTYap/tab.macros.h @@ -413,8 +413,8 @@ static inline tg_sol_fr_ptr CUT_prune_tg_solution_frames(tg_sol_fr_ptr, int); else \ GLOBAL_last_sg_fr = NULL; \ } \ - if (GLOBAL_last_sg_fr == SG_FR) \ - GLOBAL_last_sg_fr = SgFr_previous(SG_FR) + if (GLOBAL_check_sg_fr == SG_FR) \ + GLOBAL_check_sg_fr = SgFr_previous(SG_FR) #else #define insert_into_global_sg_fr_list(SG_FR) #define remove_from_global_sg_fr_list(SG_FR) diff --git a/misc/GLOBALS b/misc/GLOBALS index d6f0289c1..858455000 100644 --- a/misc/GLOBALS +++ b/misc/GLOBALS @@ -32,8 +32,7 @@ int allow_local_expansion GLOBAL_AllowLocalExpansion =TRUE int allow_global_expansion GLOBAL_AllowGlobalExpansion =TRUE int allow_trail_expansion GLOBAL_AllowTrailExpansion =TRUE UInt size_of_overflow GLOBAL_SizeOfOverflow =0 -// amount of space recovered in all garbage collections -UInt agc_last_call GLOBAL_AGcLastCall =0 + // amount of space recovered in all garbage collections UInt agc_threshold GLOBAL_AGcThreshold =10000 Agc_hook agc_hook GLOBAL_AGCHook =NULL