From d4ea15811ef046d80b84a6282bfa577b0a652b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Thu, 13 Oct 2011 15:04:16 +0100 Subject: [PATCH] fix yapor bootstrap. --- C/c_interface.c | 1 - C/init.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/C/c_interface.c b/C/c_interface.c index ce94a975e..b5132a067 100644 --- a/C/c_interface.c +++ b/C/c_interface.c @@ -2839,7 +2839,6 @@ YAP_Init(YAP_init_args *yap_init) Yap_InitPageSize(); /* init memory page size, required by later functions */ #if defined(YAPOR_COPY) || defined(YAPOR_COW) || defined(YAPOR_SBA) Yap_init_yapor_global_local_memory(); - LOCAL = REMOTE(0); #endif /* YAPOR_COPY || YAPOR_COW || YAPOR_SBA */ GLOBAL_PrologShouldHandleInterrupts = yap_init->PrologShouldHandleInterrupts; Yap_InitSysbits(); /* init signal handling and time, required by later functions */ diff --git a/C/init.c b/C/init.c index cc0d3cf93..18eb04cff 100644 --- a/C/init.c +++ b/C/init.c @@ -1264,6 +1264,9 @@ Yap_InitWorkspace(UInt Heap, UInt Stack, UInt Trail, UInt Atts, UInt max_table_s Yap_regp = ((REGSTORE *)pthread_getspecific(Yap_yaamregs_key)); LOCAL = REMOTE(0); #endif /* THREADS */ +#if defined(YAPOR_COPY) || defined(YAPOR_COW) || defined(YAPOR_SBA) + LOCAL = REMOTE(0); +#endif /* YAPOR_COPY || YAPOR_COW || YAPOR_SBA */ if (Heap < MinHeapSpace) Heap = MinHeapSpace; Heap = AdjustPageSize(Heap * K);