From bf7738174438f97b228dbcacc2d5a0494577338c Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 1 Oct 2013 16:42:12 +0100 Subject: [PATCH] alloc K * Size --- C/c_interface.c | 2 +- OPTYap/or.memory.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/C/c_interface.c b/C/c_interface.c index 570ac75ff..bb6ab402b 100644 --- a/C/c_interface.c +++ b/C/c_interface.c @@ -3242,7 +3242,7 @@ YAP_Reset(void) { CACHE_REGS int res = TRUE; -#ifndef THREADS +#if !defined(YAPOR) && !defined(THREADS) int worker_id = 0; #endif BACKUP_MACHINE_REGS(); diff --git a/OPTYap/or.memory.c b/OPTYap/or.memory.c index a99dd519d..d000bb68d 100644 --- a/OPTYap/or.memory.c +++ b/OPTYap/or.memory.c @@ -94,6 +94,9 @@ void Yap_init_yapor_global_local_memory(void) { void Yap_init_yapor_stacks_memory(UInt TrailStackArea, UInt HeapStackArea, UInt GlobalLocalStackArea, int n_workers) { long StacksArea; + HeapStackArea *= (K); + GlobalLocalStackArea *= (K); + TrailStackArea *= (K); TrailStackArea = ADJUST_SIZE_TO_PAGE(TrailStackArea); HeapStackArea = ADJUST_SIZE_TO_PAGE(HeapStackArea); GlobalLocalStackArea = ADJUST_SIZE_TO_PAGE(GlobalLocalStackArea);