#5476: Cap memory usage for one thread without disrupting other threads
---------------------------------+------------------------------------------
    Reporter:  joeyadams         |        Owner:              
        Type:  feature request   |       Status:  new         
    Priority:  normal            |    Milestone:  _|_         
   Component:  Runtime System    |      Version:  7.2.1       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------
Changes (by simonmar):

  * milestone:  => _|_


Comment:

 The only way I can see to do this would be to evacuate one thread at a
 time, completely tracing the reachable data before proceeding to the next
 thread.

 One problem is that threads are not actually treated as roots by the GC,
 because the GC detects when a thread is deadlocked by its reachability.

 Another problem is that tracing threads one at a time would be terrible
 for parallelism in the GC, so at the least it would have to be a RTS
 option.

 Personally I think the right way to handle this is to use Cloud Haskell
 and start up a new RTS instance for each of the client threads.  That way
 you get much better sandboxing too.

 So I'll leave this open with a _|_ milestone, just in case anyone comes up
 with a cheap way to implement it.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5476#comment:1>
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

Reply via email to