[GHC] #14336: ghci leaks memory

GHC ghc-devs at haskell.org
Tue Jan 9 23:03:26 UTC 2018


#14336: ghci leaks memory
-------------------------------------+-------------------------------------
        Reporter:  NeilMitchell      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  GHCi              |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:  x86_64
 Type of failure:  Runtime           |  (amd64)
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by mpickering):

 Just to be clear, I should be looking at the third column increasing? It
 starts out for me at around 8,569,448 and gradually increases up to
 13,360,528 after running 1000 iterations.

 Other things I tried.

 1. Not creating `it` bindings as one was created for each line. This
 didn't seem to make a big difference for small examples but does for big
 examples. (Max residency 11mb (unmod) vs
 2. Not running any Haskell code, so changing the string line to `:set
 -XTypeApplications", the live column still increased but more slowly. (Up
 to 11219144 after 1000 iterations).
 3. Running with `:set -fobject-code`, seemed to make no difference or make
 things slightly worse (14051160) (Just once at the start of the loop).
 4. Increasing the size of the string (by 100x) makes things much worse
 62235312 but not 100x worse, just 6x worse, maximum residency 55mb. BUT,
 running with my modified compiler which doesn't generate `it` bindings,
 only 13mb max residency.

 Anyway I don't really know what I am looking for so if someone could point
 out which number I should be looking at and what it means for my hardware
 averse brain it would be useful.

 Here is the patch I used for `no_it`.
 https://gist.github.com/78366267566cfe8cf85101fc11b169ed

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


More information about the ghc-tickets mailing list