#1461: System.Process.runInteractiveProcess leaks memory
-------------------------------+--------------------------------------------
Reporter: guest | Owner: simonmar
Type: bug | Status: closed
Priority: high | Milestone: 6.8
Component: libraries/base | Version: 6.6.1
Severity: normal | Resolution: fixed
Keywords: | Difficulty: Unknown
Os: Linux | Testcase:
Architecture: x86 |
-------------------------------+--------------------------------------------
Changes (by simonmar):
* resolution: => fixed
* status: new => closed
Comment:
This bug has two parts. Firstly, a closed handle holds on to its buffer
(8k, usually), and having a lot of these floating around, as this example
does, can give the illusion of a space leak. Depending on when GC runs
and when finalizers run, the memory usage can at times be high, and other
times be low. Over time, the high-water mark tends to increase. (you can
use GHC's new `+RTS -h` to verify that there is no real leak).
I changed hClose to free the 8k buffer:
{{{
Thu Jul 19 09:14:19 PDT 2007 Simon Marlow <[EMAIL PROTECTED]>
* in hClose, free the handle buffer by replacing it with an empty one
}}}
Which reduces the average consumption dramatically.
The example was still leaking on my system, however. I finally tracked it
down to this:
[http://cygwin.com/ml/libc-hacker/2007-01/msg00000.html]
which is an upstream bug, so I'm ignoring it.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1461>
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