[GHC] #8703: Use guard pages rather than heap checks

GHC ghc-devs at haskell.org
Mon Jan 27 05:37:02 UTC 2014


#8703: Use guard pages rather than heap checks
------------------------------------+-------------------------------------
       Reporter:  schyler           |             Owner:  simonmar
           Type:  feature request   |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Runtime System    |           Version:
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 By mmap'ing memory using MAP_ANONYMOUS (or /dev/zero) as PROT_NONE
 (Windows has an equivalent functionality with VirtualAlloc), it's possible
 to create a page that will fault when read or written to. It may be
 possible to remove the heap checks in the runtime, speeding up
 allocations, and instead expand the heap when a fault is raised.

 This is likely cheaper for large pages full of many small allocations than
 the cost of the heap checking branch.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8703>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list