Initial snarf.
[shack.git] / doc / mcc / gc / gc_operations.tex
blob912df7d0db78a3a8f1102df44ac5b988e72b6cbf
5 \section{Garbage collection algorithm}
7 \subsection{Operations on the roots}
9 The $\ms{minor\_roots}$ array contains pointers to blocks in the major heap that \emph{may} contain
10 pointers into the minor heap. The \thmtitle{Root invariant}~\ref{invariant:roots} requires that
11 the root bit $R$ is set in the header of each block in $\ms{minor\_roots}$.
13 The $\ms{clear\_minor\_root}$ function deletes all entries in $\ms{minor\_roots}$, clearing the root
14 bits $R$ in the process.
16 \subsection{The mark phase}
18 The
20 \subsection{Garbage collection}
22 The garbage collector is called with five parameters:
24 \begin{enumerate}
25 \item the process context $\ms{contextp}$,
26 \item the number of heap bytes requested $\ms{req\_bytes}$,
27 \item the number of free entries in the pointer table requested $\ms{req\_pointers}$,
28 \item an array of values of the machine registers $\ms{regs}$,
29 \item and a bitmask of indicating which registers contain pointers.
30 \end{enumerate}
32 The $\ms{normalize}$ function converts the value of each register that contain a pointer to its
33 corresponding index in the pointer table. The $\ms{denormalize}$ function does the reverse.
35 % -*-
36 % Local Variables:
37 % Mode: LaTeX
38 % fill-column: 100
39 % TeX-master: "paper"
40 % TeX-command-default: "LaTeX/dvips Interactive"
41 % End:
42 % -*-