diff options
-rw-r--r-- | rts/posix/OSMem.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c index 76b863e860..cbc76f82d9 100644 --- a/rts/posix/OSMem.c +++ b/rts/posix/OSMem.c @@ -184,8 +184,7 @@ osGetMBlocks(nat n) // Compute size = MBLOCK_SIZE * (W_)n, // while testing for integer overflow. - if (n > (nat)((W_)-1)) - barf("osGetMBlocks: impossibly large MBlock count %d; nat larger than W_?", n); + // We assume that W_ is at least as large a type as nat. if ((W_)n > ((W_)-1) / MBLOCK_SIZE) { // We tried to allocate, say, 4 GB or more on a 32-bit system. errorBelch("out of memory (requested %d MBlocks)", n); |