[project @ 1997-03-14 02:24:54 by sof]
[ghc-hetmet.git] / ghc / runtime / storage / SMinit.lc
1 \section[storage-manager-init]{Initialising the storage manager}
2
3 To initialise the storage manager, we pass it:
4 \begin{itemize}
5 \item
6 An @argc@/@argv@ combo, which are the command-line arguments that have
7 been deemed to belong to the runtime system.  The initialisation
8 routine can slurp around in there for information of interest to
9 it.
10
11 \item
12 A filehandle to which any storage-manager statistics should be written.
13 \end{itemize}
14
15 \begin{code}
16 #define NULL_REG_MAP
17 #include "SMinternal.h"
18 \end{code}
19
20 \section[storage-manager-exit]{Winding up the storage manager}
21
22 \begin{code}
23 rtsBool
24 exitSM (smInfo *sm_info)
25 {
26      /* Upon closing down the storage manager, we free all foreign objects */
27     freeForeigns(sm_info->ForeignObjList);
28     stat_exit(sm_info->hp - hp_start);
29
30     return rtsTrue; /* I'm happy */
31 }
32 \end{code}