FIX #2332: avoid overflow on 64-bit machines in the memory allocator
[ghc-hetmet.git] / rts / posix / OSMem.c
index 66f6309..7216f0e 100644 (file)
@@ -176,7 +176,7 @@ void *
 osGetMBlocks(nat n)
 {
   caddr_t ret;
-  lnat size = MBLOCK_SIZE * n;
+  lnat size = MBLOCK_SIZE * (lnat)n;
  
   if (next_request == 0) {
       // use gen_map_mblocks the first time.