
#14492: Tiered memory allocation restricts available memory -------------------------------------+------------------------------------- Reporter: unode | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.4.1 Component: Runtime System | Version: 8.0.2 Resolution: | Keywords: memory ulimit Operating System: Linux | Architecture: x86_64 Type of failure: Poor/confusing | (amd64) error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * cc: Jaffacake (added) * milestone: => 8.4.1 Comment:
A simple solution is to replace `*len /= 2` by `*len -= *len/8`. The max number of calls to `mmap()` goes up from 14 to 67, but wastage is now at most 1/8th of the final allocated memory.
Indeed this sounds like a pretty simple solution. I don't even think the increase in number of `mmap` calls is all that bad since these are failed `mmap`s, so they shouldn't incur the usual overhead. What do you think, simonmar? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14492#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler