af96b5dd1c293830369f0f07d4abbae505bff669
[ghc.git] / libraries / base / System / Mem.hs
1 {-# LANGUAGE CPP #-}
2
3 #ifdef __GLASGOW_HASKELL__
4 {-# LANGUAGE ForeignFunctionInterface #-}
5 #endif
6
7 -----------------------------------------------------------------------------
8 -- |
9 -- Module : System.Mem
10 -- Copyright : (c) The University of Glasgow 2001
11 -- License : BSD-style (see the file libraries/base/LICENSE)
12 --
13 -- Maintainer : libraries@haskell.org
14 -- Stability : provisional
15 -- Portability : portable
16 --
17 -- Memory-related system things.
18 --
19 -----------------------------------------------------------------------------
20
21 module System.Mem (
22 performGC -- :: IO ()
23 ) where
24
25 import Prelude
26
27 #ifdef __HUGS__
28 import Hugs.IOExts
29 #endif
30
31 #ifdef __GLASGOW_HASKELL__
32 -- | Triggers an immediate garbage collection
33 foreign import ccall {-safe-} "performMajorGC" performGC :: IO ()
34 #endif
35
36 #ifdef __NHC__
37 import NHC.IOExtras (performGC)
38 #endif