summaryrefslogtreecommitdiff
path: root/ghc/runtime/storage/SMinit.lc
blob: 4224c9a2b948722b9b95f851a00ad3ca1c706800 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
\section[storage-manager-init]{Initialising the storage manager}

To initialise the storage manager, we pass it:
\begin{itemize}
\item
An @argc@/@argv@ combo, which are the command-line arguments that have
been deemed to belong to the runtime system.  The initialisation
routine can slurp around in there for information of interest to
it.

\item
A filehandle to which any storage-manager statistics should be written.
\end{itemize}

\begin{code}
#define NULL_REG_MAP
#include "SMinternal.h"
\end{code}

\section[storage-manager-exit]{Winding up the storage manager}

\begin{code}
rtsBool
exitSM (smInfo *sm_info)
{
    stat_exit(sm_info->hp - hp_start);

    return rtsTrue; /* I'm happy */
}
\end{code}