From 597a63cc1257bfe05f685c57fb60057ec8e85c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Mon, 6 Feb 2012 15:11:38 +0000 Subject: [PATCH] fix messup on WIN64. --- C/globals.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C/globals.c b/C/globals.c index 07769bdf5..a41135716 100644 --- a/C/globals.c +++ b/C/globals.c @@ -55,7 +55,7 @@ static char SccsId[] = "%W% %G%"; static UInt big2arena_sz(CELL *arena_base) { - return ((MP_INT*)(arena_base+2))->_mp_alloc + (sizeof(MP_INT) + sizeof(Functor)+2*sizeof(CELL))/sizeof(CELL); + return (((MP_INT*)(arena_base+2))->_mp_alloc*sizeof(mp_limb_t) + sizeof(MP_INT) + sizeof(Functor)+2*sizeof(CELL))/sizeof(CELL); } static UInt @@ -97,7 +97,7 @@ CreateNewArena(CELL *ptr, UInt size) ptr[1] = EMPTY_ARENA; dst = (MP_INT *)(ptr+2); dst->_mp_size = 0L; - dst->_mp_alloc = arena2big_sz(size); + dst->_mp_alloc = (sizeof(CELL)/sizeof(mp_limb_t))*arena2big_sz(size); ptr[size-1] = EndSpecials; return t; }