Remove GLOBAL_AGcLastCall. Fix GLOBAL_check_sg_fr.
This commit is contained in:
parent
ebd0e8a7c0
commit
d6fc76faf1
1
C/agc.c
1
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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -33,8 +33,6 @@ static void InitGlobal(void) {
|
||||
GLOBAL_AllowTrailExpansion = TRUE;
|
||||
GLOBAL_SizeOfOverflow = 0;
|
||||
|
||||
GLOBAL_AGcLastCall = 0;
|
||||
|
||||
GLOBAL_AGcThreshold = 10000;
|
||||
GLOBAL_AGCHook = NULL;
|
||||
|
||||
|
@ -36,8 +36,6 @@ static void RestoreGlobal(void) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if THREADS
|
||||
|
||||
|
||||
|
@ -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++) {
|
||||
|
@ -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) \
|
||||
|
@ -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))
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user