fix arena initialization

This commit is contained in:
Vítor Santos Costa
2014-08-23 14:47:40 -05:00
parent 495ab155f9
commit 19d0f56f2d
18 changed files with 362 additions and 187 deletions

View File

@@ -1783,6 +1783,14 @@ Yap_InitYaamRegs( int myworker_id )
DEPTH = RESET_DEPTH();
#endif
STATIC_PREDICATES_MARKED = FALSE;
if (REMOTE_GlobalArena(myworker_id) == 0L ||
REMOTE_GlobalArena(myworker_id) == TermNil) {
} else {
HR = RepAppl(REMOTE_GlobalArena(myworker_id));
}
REMOTE_GlobalArena(myworker_id) = TermNil;
Yap_AllocateDefaultArena(128*1024, 2, myworker_id);
Yap_InitPreAllocCodeSpace( myworker_id );
#ifdef FROZEN_STACKS
H_FZ = HR;
#ifdef YAPOR_SBA
@@ -1813,12 +1821,6 @@ Yap_InitYaamRegs( int myworker_id )
PP = NULL;
PREG_ADDR = NULL;
#endif
if (REMOTE_GlobalArena(myworker_id) == 0L ||
REMOTE_GlobalArena(myworker_id) == TermNil) {
REMOTE_GlobalArena(myworker_id) = TermNil;
Yap_AllocateDefaultArena(128*1024, 2, myworker_id);
Yap_InitPreAllocCodeSpace( myworker_id );
}
cut_c_initialize( myworker_id );
Yap_PrepGoal(0, NULL, NULL PASS_REGS);
#ifdef TABLING