#5188: Runtime error when allocating lots of memory
------------------------+---------------------------------------------------
Reporter: knyblad | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.2.1
Component: GHCi | Version: 6.12.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Linux | Blocking:
Architecture: x86 | Failure: None/Unknown
------------------------+---------------------------------------------------
Changes (by simonmar):
* milestone: => 7.2.1
Comment:
Here's the relevant bit of code:
{{{
if (ret == (void *)-1) {
if (errno == ENOMEM ||
(errno == EINVAL && sizeof(void*)==4 && size >= 0xc0000000)) {
// If we request more than 3Gig, then we get EINVAL
// instead of ENOMEM (at least on Linux).
errorBelch("out of memory (requested %lu bytes)", size);
stg_exit(EXIT_FAILURE);
} else {
barf("getMBlock: mmap: %s", strerror(errno));
}
}
}}}
Perhaps we're getting `EINVAL` under different circumstances. I didn't
manage to reproduce it (yet).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5188#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs