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