Wed Nov 25 04:59:17 PST 2009  Simon Marlow <marlo...@gmail.com>
  * threadStackOverflow: check whether stack squeezing released some stack 
(#3677)
  Ignore-this: d35089eb93f5b367b7d1c445bda79232
  
  In a stack overflow situation, stack squeezing may reduce the stack
  size, but we don't know whether it has been reduced enough for the
  stack check to succeed if we try again.  Fortunately stack squeezing
  is idempotent, so all we need to do is record whether *any* squeezing
  happened.  If we are at the stack's absolute -K limit, and stack
  squeezing happened, then we try running the thread again.
  
  We also want to avoid enlarging the stack if squeezing has already
  released some of it.  However, we don't want to get into a
  pathalogical situation where a thread has a nearly full stack (near
  its current limit, but not near the absolute -K limit), keeps
  allocating a little bit, squeezing removes a little bit, and then it
  runs again.  So to avoid this, if we squeezed *and* there is still
  less than BLOCK_SIZE_W words free, then we enlarge the stack anyway.

    M ./includes/rts/Constants.h +7
    M ./rts/Schedule.c -1 +31
    M ./rts/ThreadPaused.c +5

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20091125125917-12142-f0ea8e50d5ff21b242c0008dd7af085665fec2d3.gz

_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to