[GHC] #8189: Default to infinite stack size?
GHC
ghc-devs at haskell.org
Mon Sep 9 16:29:23 CEST 2013
#8189: Default to infinite stack size?
-------------------------------+-------------------------------------------
Reporter: nh2 | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.8.1
Component: Runtime | Version: 7.6.3
System | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Easy (less than 1 hour)
Unknown/Multiple | Blocked By:
Type of failure: Runtime | Related Tickets:
crash |
Test Case: |
Blocking: |
-------------------------------+-------------------------------------------
Comment (by simonmar):
We can't tell whether the heap is full by looking at `total_allocated`,
because the GC needs to run first (`total_allocated` basically tells you
how much memory was allocated since the last GC). I can't think of a good
way to determine whether we ran out of heap because a lot of stack was
allocated - it's guesswork.
Should there be a default maximum heap size? I'm hesitant to do this
because enabling the maximum heap size also enables the automagic
machinery that switches on the compacting collector when we get near the
maximum heap size, and the compacting collector is much less well battle-
tested than the standard copying GC, not to mention much slower. On the
other hand having a maximum heap size with the copying GC doesn't work
terribly well, because the copying GC wastes so much memory.
We could just set the default maximum stack size to be some sensible
fraction of real memory?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8189#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list