summaryrefslogtreecommitdiff
path: root/rts/sm/HeapAlloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'rts/sm/HeapAlloc.h')
-rw-r--r--rts/sm/HeapAlloc.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/rts/sm/HeapAlloc.h b/rts/sm/HeapAlloc.h
index 58aae1119d..f91795529d 100644
--- a/rts/sm/HeapAlloc.h
+++ b/rts/sm/HeapAlloc.h
@@ -63,8 +63,7 @@ extern struct mblock_address_range mblock_address_space;
#elif SIZEOF_VOID_P == 4
extern StgWord8 mblock_map[];
-/* On a 32-bit machine a 4KB table is always sufficient */
-# define MBLOCK_MAP_SIZE 4096
+# define MBLOCK_MAP_SIZE (1 << (32 - MBLOCK_SHIFT))
# define MBLOCK_MAP_ENTRY(p) ((StgWord)(p) >> MBLOCK_SHIFT)
# define HEAP_ALLOCED(p) mblock_map[MBLOCK_MAP_ENTRY(p)]
# define HEAP_ALLOCED_GC(p) HEAP_ALLOCED(p)