summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2013-08-29 17:30:11 -0500
committerAustin Seipp <aseipp@pobox.com>2013-08-29 17:30:11 -0500
commitc87c19f55a3ed7f437d738bfbf436afbc3ac0877 (patch)
treec1f77f66d77d99ab287efd6df8ae8d70df182bc1 /rts
parent1247dff7b852d45dc5006ae8be33ac991cc76c74 (diff)
downloadhaskell-c87c19f55a3ed7f437d738bfbf436afbc3ac0877.tar.gz
Revert "Paranoid integer overflow check in osGetMBlocks"
This reverts commit 1247dff7b852d45dc5006ae8be33ac991cc76c74. Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'rts')
-rw-r--r--rts/posix/OSMem.c3
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);