[commit: ghc] master: Really unload object code when it is safe to do so (#8039) (bdfefb3)

git at git.haskell.org git at git.haskell.org
Thu Aug 22 12:35:38 CEST 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/bdfefb3b72a71cd0afca6e7766456c0d97c47c86/ghc

>---------------------------------------------------------------

commit bdfefb3b72a71cd0afca6e7766456c0d97c47c86
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Fri Jul 5 15:57:32 2013 +0100

    Really unload object code when it is safe to do so (#8039)
    
    The next major GC after an unloadObj() will do a traversal of the heap
    to determine whether the object code can be removed from memory or
    not.  We'll keep doing these until it is safe to remove the object
    code.
    
    In my experiments with GHCi, the objects get unloaded immediately,
    which is a good sign: we're not accidentally holding on to any
    references anywhere in the GHC data structures.
    
    Changes relative to the patch earlier posted on the ticket:
     - fix two memory leaks discovered with Valgrind, after
       testing with tests/rts/linker_unload.c


>---------------------------------------------------------------

bdfefb3b72a71cd0afca6e7766456c0d97c47c86
 rts/CheckUnload.c     |  303 +++++++++++++++++++++++++++++++++++++++++++++++++
 rts/CheckUnload.h     |   20 ++++
 rts/Linker.c          |   96 +++++++++++++---
 rts/LinkerInternals.h |   12 +-
 rts/sm/GC.c           |    5 +
 5 files changed, 419 insertions(+), 17 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc bdfefb3b72a71cd0afca6e7766456c0d97c47c86




More information about the ghc-commits mailing list