[commit: packages/base] master: Expose performMinorGC (#8257) (c1491e6)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[commit: packages/base] master: Expose performMinorGC (#8257) (c1491e6)

Christiaan Baaij
Shouldn't the last line of the patch be?:
> +foreign import ccall "performGC" performMinorGC :: IO ()

the rts doesn't export a function called "performMinorGC".

-- Christiaan

On Sep 30, 2013, at 12:24 AM, git at git.haskell.org wrote:

> Repository : ssh://git at git.haskell.org/base
>
> On branch  : master
> Link       : http://ghc.haskell.org/trac/ghc/changeset/c1491e683d3edc31fd20bd3b3021d3a620aa0184/base
>
>> ---------------------------------------------------------------
>
> commit c1491e683d3edc31fd20bd3b3021d3a620aa0184
> Author: Austin Seipp <austin at well-typed.com>
> Date:   Sun Sep 29 09:42:06 2013 -0500
>
>    Expose performMinorGC (#8257)
>
>    Signed-off-by: Austin Seipp <austin at well-typed.com>
>
>
>> ---------------------------------------------------------------
>
> c1491e683d3edc31fd20bd3b3021d3a620aa0184
> System/Mem.hs |   20 ++++++++++++++------
> 1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/System/Mem.hs b/System/Mem.hs
> index f162a75..2ad75ce 100644
> --- a/System/Mem.hs
> +++ b/System/Mem.hs
> @@ -14,11 +14,19 @@
> --
> -----------------------------------------------------------------------------
>
> -module System.Mem (
> -        performGC
> -  ) where
> -
> +module System.Mem
> +       ( performGC
> +       , performMajorGC
> +       , performMinorGC
> +       ) where
> import Prelude
>
> --- | Triggers an immediate garbage collection
> -foreign import ccall {-safe-} "performMajorGC" performGC :: IO ()
> +-- | Triggers an immediate garbage collection.
> +performGC :: IO ()
> +performGC = performMajorGC
> +
> +-- | Triggers an immediate garbage collection.
> +foreign import ccall "performMajorGC" performMajorGC :: IO ()
> +
> +-- | Triggers an immediate minor garbage collection.
> +foreign import ccall "performMinorGC" performMinorGC :: IO ()
>
> _______________________________________________
> ghc-commits mailing list
> ghc-commits at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-commits