Commit c87c19f5 authored by thoughtpolice's avatar thoughtpolice
Browse files

Revert "Paranoid integer overflow check in osGetMBlocks"

This reverts commit 1247dff7

.
Signed-off-by: thoughtpolice's avatarAustin Seipp <aseipp@pobox.com>
parent 1247dff7
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment