ghci unload

Keean Schupke k.schupke@ic.ac.uk
Wed, 08 May 2002 17:07:00 +0100


Hi,
    I was wondering if anyone had any suggestions/advice on the 
following... I am doing dynamic loading using bits of GHCi and it
all works very nicely.

    occasionally however I want to unload a module and reload it... this 
works fine however I remember from some other post that
the memory from the unload is not reclaimed. This would explain the slow 
memory creap I am seeing.

    So, finally, here's my question: why is it difficault to recover 
this memory - is there any way of doing it - remembering that I am
not actually using anything from GHCi apart from the linker  - a typical 
session might look like.

    initLinker
    load [lots of objects...]
    resolveObjects
        :
    load module1
    load module2
    resolveObjects
        :
    unload module1
    load module1.1
    resolveObjects
        :
    etc...



    Regards,
    Keean Schupke.