#650: Improve interaction between mutable arrays and GC
--------------------------------------+-------------------------------------
Reporter: simonmar | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone: 6.14.1
Component: Runtime System | Version: 6.4.1
Resolution: | Keywords:
Difficulty: Difficult (2-5 days) | Os: Unknown/Multiple
Testcase: | Architecture: Unknown/Multiple
Failure: Runtime performance bug |
--------------------------------------+-------------------------------------
Comment (by simonmar):
Replying to [comment:16 morrow]:
> One other possible method to deal with this is to make old-generation
pages containing mutable array data read-only via mprotect (or
equivalent). Any later write will then cause a SIGSEGV,
Not keen on this for a few reasons:
* non-portability
* too coarse-grained
* only works for large arrays
* GC needs to fiddle around with mprotecting pages
* taking the signal is expensive
* recovering from a SIGSEGV is very tricky
I must be getting old, but my feeling is that tricks like this sound quite
cool but end up being a pain in the neck in the long run.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/650#comment:18>
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