[GHC] #8189: Default to infinite stack size?
GHC
ghc-devs at haskell.org
Mon Sep 9 16:05:07 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 bgamari):
Oh dear; that is embarrassing. My intent here was more along the lines of,
`if (total_allocated > RtsFlags.GcFlags.maxHeapSize)`. While it seems that
the total allocations of each capability individually is pretty easy to
come by (`cap->total_allocated`), it's not clear how to get the sum of
these without iterating over all capabilities which seems a bit excessive
in a warm allocation path. Either way, comparing against `req_blocks` was
certainly a bit sloppy.
Regarding the lack of default heap size limit, perhaps a solution here
might be to set the default heap limit to some fraction (say 0.8) of the
physical memory size. Admittedly determining this might be a bit platform
specific but seeing as the RTS already knows how to get a core count it's
not a great stretch.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8189#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list