|
From: <sv...@va...> - 2005-04-28 10:32:08
|
Author: sewardj Date: 2005-04-28 11:32:02 +0100 (Thu, 28 Apr 2005) New Revision: 3580 Modified: trunk/memcheck/mc_main.c Log: Define N_PRIMARY_MAP to actually generate a 64-bit constant on 64-bit platforms, otherwise the address-masking operations to establish alignment and primary-mappability are wrong on 64-bit platforms. Also set the size of fast-mapped address space on 64-bit platforms to 16G. Modified: trunk/memcheck/mc_main.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/memcheck/mc_main.c 2005-04-28 09:40:53 UTC (rev 3579) +++ trunk/memcheck/mc_main.c 2005-04-28 10:32:02 UTC (rev 3580) @@ -115,10 +115,23 @@ /* --------------- Basic configuration --------------- */ =20 /* Only change this. N_PRIMARY_MAP *must* be a power of 2. */ -#define N_PRIMARY_BITS 16 =20 +#if VEX_HOST_WORDSIZE =3D=3D 4 + +/* cover the entire address space */ +# define N_PRIMARY_BITS 16 + +#else + +/* Just handle the first 16G fast and the rest via auxiliary + primaries. */ +# define N_PRIMARY_BITS 18 + +#endif + + /* Do not change this. */ -#define N_PRIMARY_MAP (1 << N_PRIMARY_BITS) +#define N_PRIMARY_MAP (1ULL << N_PRIMARY_BITS) =20 /* Do not change this. */ #define MAX_PRIMARY_ADDRESS (Addr)((((Addr)65536) * N_PRIMARY_MAP)-1) |