\doxysection{workspace/post-\/scarcity/src/memory/conspage.c File Reference}
\hypertarget{conspage_8c}{}\label{conspage_8c}\index{workspace/post-\/scarcity/src/memory/conspage.c@{workspace/post-\/scarcity/src/memory/conspage.c}}
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include "{}memory/consspaceobject.\+h"{}}\newline
{\ttfamily \#include "{}memory/conspage.\+h"{}}\newline
{\ttfamily \#include "{}debug.\+h"{}}\newline
{\ttfamily \#include "{}memory/dump.\+h"{}}\newline
{\ttfamily \#include "{}memory/stack.\+h"{}}\newline
{\ttfamily \#include "{}memory/vectorspace.\+h"{}}\newline
Include dependency graph for conspage.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{conspage_8c__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{conspage_8c_a04ba7c874b05e9789d0aca9ee6b106a7}{allocate\+\_\+cell}} (uint32\+\_\+t tag)
\begin{DoxyCompactList}\small\item\em Allocates a cell with the specified {\ttfamily tag}. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{conspage_8c_a8078785bb1865878f934d02b28e600d9}{dump\+\_\+pages}} (\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}output)
\begin{DoxyCompactList}\small\item\em dump the allocated pages to this {\ttfamily output} stream. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{conspage_8c_a7cf88f8487cd8fef12fdd78a2aaa6216}{free\+\_\+cell}} (struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} pointer)
\begin{DoxyCompactList}\small\item\em Frees the cell at the specified {\ttfamily pointer}; for all the types of cons-\/space object which point to other cons-\/space objects, cascade the decrement. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{conspage_8c_aeb73441904896a283f5b57298479bc4a}{initialise\+\_\+cons\+\_\+pages}} ()
\begin{DoxyCompactList}\small\item\em initialise the cons page system; to be called exactly once during startup. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{conspage_8c_a4c4c78e7fc8fb93ca030af51fba71c1c}{make\+\_\+cons\+\_\+page}} ()
\begin{DoxyCompactList}\small\item\em Make a cons page. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{conspage_8c_ab8d9d6417f194dca8d8322301cf37c7c}{summarise\+\_\+allocation}} ()
\end{DoxyCompactItemize}
\doxysubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
bool \mbox{\hyperlink{conspage_8c_a6797b106f2c4921b50e4ec8f20d561f1}{conspageinitihasbeencalled}} = false
\begin{DoxyCompactList}\small\item\em Flag indicating whether conspage initialisation has been done. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{conspage_8h_structcons__page}{cons\+\_\+page}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{conspage_8c_a7cce1a2d3dd8b5abe5e30622d94e6959}{conspages}} \mbox{[}\mbox{\hyperlink{conspage_8h_a2656b2b52cfab9ff1a7f8cf63e5d111f}{NCONSPAGES}}\mbox{]}
\begin{DoxyCompactList}\small\item\em An array of pointers to cons pages. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{conspage_8c_ae0a20197a96d9f07dac864b925cd0f32}{freelist}} = \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}}
\begin{DoxyCompactList}\small\item\em The (global) pointer to the (global) freelist. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{conspage_8c_a5d208b62e1b9701d407cbb38daa2a225}{initialised\+\_\+cons\+\_\+pages}} = 0
\begin{DoxyCompactList}\small\item\em the number of cons pages which have thus far been initialised. \end{DoxyCompactList}\item 
uint64\+\_\+t \mbox{\hyperlink{conspage_8c_a9439a14783e93d3b50b984002c8b18cb}{total\+\_\+cells\+\_\+allocated}} = 0
\begin{DoxyCompactList}\small\item\em keep track of total cells allocated and freed to check for leakage. \end{DoxyCompactList}\item 
uint64\+\_\+t \mbox{\hyperlink{conspage_8c_a0ab1cafb4664d438d2cd75ab587035f0}{total\+\_\+cells\+\_\+freed}} = 0
\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\Hypertarget{conspage_8c_a04ba7c874b05e9789d0aca9ee6b106a7}\label{conspage_8c_a04ba7c874b05e9789d0aca9ee6b106a7} 
\index{conspage.c@{conspage.c}!allocate\_cell@{allocate\_cell}}
\index{allocate\_cell@{allocate\_cell}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{allocate\_cell()}{allocate\_cell()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} allocate\+\_\+cell (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{tag }\end{DoxyParamCaption})}



Allocates a cell with the specified {\ttfamily tag}. 

Dangerous, primitive, low level.


\begin{DoxyParams}{Parameters}
{\em tag} & the tag of the cell to allocate -\/ must be a valid cons space tag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the cons pointer which refers to the cell allocated. 
\end{DoxyReturn}
\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000006}{Todo}}]handle the case where another \doxylink{conspage_8h_structcons__page}{cons\+\_\+page} cannot be allocated; return an exception. Which, as we cannot create such an exception when cons space is exhausted, means we must construct it at init time. \end{DoxyRefDesc}


Definition at line \mbox{\hyperlink{conspage_8c_source_l00222}{222}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



References \mbox{\hyperlink{conspage_8c_source_l00222}{allocate\+\_\+cell()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00635}{cons\+\_\+space\+\_\+object\+::count}}, \mbox{\hyperlink{debug_8h_source_l00021}{DEBUG\+\_\+\+ALLOC}}, \mbox{\hyperlink{debug_8c_source_l00101}{debug\+\_\+printf()}}, \mbox{\hyperlink{conspage_8c_source_l00046}{freelist}}, \mbox{\hyperlink{consspaceobject_8h_source_l00063}{FREETAG}}, \mbox{\hyperlink{conspage_8c_source_l00061}{make\+\_\+cons\+\_\+page()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00277}{NIL}}, \mbox{\hyperlink{consspaceobject_8h_source_l00419}{cons\+\_\+pointer\+::offset}}, \mbox{\hyperlink{consspaceobject_8h_source_l00417}{cons\+\_\+pointer\+::page}}, \mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{cons\+\_\+space\+\_\+object\+::payload}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, \mbox{\hyperlink{consspaceobject_8h_a21cb645ce4ae20308447dcd59534bf38}{cons\+\_\+space\+\_\+object\+::tag}}, \mbox{\hyperlink{consspaceobject_8h_source_l00030}{TAGLENGTH}}, and \mbox{\hyperlink{conspage_8c_source_l00034}{total\+\_\+cells\+\_\+allocated}}.



Referenced by \mbox{\hyperlink{conspage_8c_source_l00222}{allocate\+\_\+cell()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00177}{make\+\_\+cons()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00200}{make\+\_\+exception()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00218}{make\+\_\+function()}}, \mbox{\hyperlink{integer_8c_source_l00089}{make\+\_\+integer()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00240}{make\+\_\+lambda()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00257}{make\+\_\+nlambda()}}, \mbox{\hyperlink{ratio_8c_source_l00312}{make\+\_\+ratio()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00405}{make\+\_\+read\+\_\+stream()}}, \mbox{\hyperlink{real_8c_source_l00021}{make\+\_\+real()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00379}{make\+\_\+special()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00308}{make\+\_\+string\+\_\+like\+\_\+thing()}}, \mbox{\hyperlink{psse__time_8c_source_l00059}{make\+\_\+time()}}, \mbox{\hyperlink{vectorspace_8c_source_l00042}{make\+\_\+vec\+\_\+pointer()}}, and \mbox{\hyperlink{consspaceobject_8c_source_l00422}{make\+\_\+write\+\_\+stream()}}.

\Hypertarget{conspage_8c_a8078785bb1865878f934d02b28e600d9}\label{conspage_8c_a8078785bb1865878f934d02b28e600d9} 
\index{conspage.c@{conspage.c}!dump\_pages@{dump\_pages}}
\index{dump\_pages@{dump\_pages}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{dump\_pages()}{dump\_pages()}}
{\footnotesize\ttfamily void dump\+\_\+pages (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}}]{output }\end{DoxyParamCaption})}



dump the allocated pages to this {\ttfamily output} stream. 



Definition at line \mbox{\hyperlink{conspage_8c_source_l00124}{124}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



References \mbox{\hyperlink{conspage_8h_source_l00024}{CONSPAGESIZE}}, \mbox{\hyperlink{dump_8c_source_l00059}{dump\+\_\+object()}}, \mbox{\hyperlink{conspage_8c_source_l00040}{initialised\+\_\+cons\+\_\+pages}}, and \mbox{\hyperlink{fopen_8h_source_l00050}{url\+\_\+fwprintf}}.



Referenced by \mbox{\hyperlink{init_8c_source_l00206}{main()}}.

\Hypertarget{conspage_8c_a7cf88f8487cd8fef12fdd78a2aaa6216}\label{conspage_8c_a7cf88f8487cd8fef12fdd78a2aaa6216} 
\index{conspage.c@{conspage.c}!free\_cell@{free\_cell}}
\index{free\_cell@{free\_cell}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{free\_cell()}{free\_cell()}}
{\footnotesize\ttfamily void free\+\_\+cell (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{pointer }\end{DoxyParamCaption})}



Frees the cell at the specified {\ttfamily pointer}; for all the types of cons-\/space object which point to other cons-\/space objects, cascade the decrement. 

Dangerous, primitive, low level.

@pointer the cell to free 

Definition at line \mbox{\hyperlink{conspage_8c_source_l00143}{143}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



References \mbox{\hyperlink{consspaceobject_8c_source_l00035}{check\+\_\+tag()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00046}{CONSTV}}, \mbox{\hyperlink{consspaceobject_8h_source_l00635}{cons\+\_\+space\+\_\+object\+::count}}, \mbox{\hyperlink{debug_8h_source_l00021}{DEBUG\+\_\+\+ALLOC}}, \mbox{\hyperlink{debug_8c_source_l00136}{debug\+\_\+dump\+\_\+object()}}, \mbox{\hyperlink{debug_8c_source_l00101}{debug\+\_\+printf()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00080}{dec\+\_\+ref()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00057}{EXCEPTIONTV}}, \mbox{\hyperlink{vectorspace_8c_source_l00123}{free\+\_\+vso()}}, \mbox{\hyperlink{conspage_8c_source_l00046}{freelist}}, \mbox{\hyperlink{consspaceobject_8h_source_l00063}{FREETAG}}, \mbox{\hyperlink{consspaceobject_8h_source_l00068}{FREETV}}, \mbox{\hyperlink{consspaceobject_8h_source_l00080}{FUNCTIONTV}}, \mbox{\hyperlink{consspaceobject_8h_source_l00090}{INTEGERTV}}, \mbox{\hyperlink{consspaceobject_8h_source_l00111}{LAMBDATV}}, \mbox{\hyperlink{consspaceobject_8h_source_l00277}{NIL}}, \mbox{\hyperlink{consspaceobject_8h_source_l00168}{NLAMBDATV}}, \mbox{\hyperlink{consspaceobject_8h_source_l00419}{cons\+\_\+pointer\+::offset}}, \mbox{\hyperlink{consspaceobject_8h_source_l00417}{cons\+\_\+pointer\+::page}}, \mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{cons\+\_\+space\+\_\+object\+::payload}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, \mbox{\hyperlink{consspaceobject_8h_source_l00179}{RATIOTV}}, \mbox{\hyperlink{consspaceobject_8h_source_l00189}{READTV}}, \mbox{\hyperlink{consspaceobject_8h_source_l00211}{SPECIALTV}}, \mbox{\hyperlink{consspaceobject_8h_source_l00221}{STRINGTV}}, \mbox{\hyperlink{consspaceobject_8h_source_l00231}{SYMBOLTV}}, \mbox{\hyperlink{consspaceobject_8h_a21cb645ce4ae20308447dcd59534bf38}{cons\+\_\+space\+\_\+object\+::tag}}, \mbox{\hyperlink{consspaceobject_8h_source_l00030}{TAGLENGTH}}, \mbox{\hyperlink{conspage_8c_source_l00035}{total\+\_\+cells\+\_\+freed}}, \mbox{\hyperlink{fopen_8c_source_l00258}{url\+\_\+fclose()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00262}{VECTORPOINTTV}}, and \mbox{\hyperlink{consspaceobject_8h_source_l00272}{WRITETV}}.



Referenced by \mbox{\hyperlink{consspaceobject_8c_source_l00080}{dec\+\_\+ref()}}.

\Hypertarget{conspage_8c_aeb73441904896a283f5b57298479bc4a}\label{conspage_8c_aeb73441904896a283f5b57298479bc4a} 
\index{conspage.c@{conspage.c}!initialise\_cons\_pages@{initialise\_cons\_pages}}
\index{initialise\_cons\_pages@{initialise\_cons\_pages}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{initialise\_cons\_pages()}{initialise\_cons\_pages()}}
{\footnotesize\ttfamily void initialise\+\_\+cons\+\_\+pages (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



initialise the cons page system; to be called exactly once during startup. 



Definition at line \mbox{\hyperlink{conspage_8c_source_l00257}{257}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



References \mbox{\hyperlink{conspage_8c_source_l00029}{conspageinitihasbeencalled}}, \mbox{\hyperlink{conspage_8c_source_l00051}{conspages}}, \mbox{\hyperlink{debug_8h_source_l00021}{DEBUG\+\_\+\+ALLOC}}, \mbox{\hyperlink{debug_8c_source_l00101}{debug\+\_\+printf()}}, \mbox{\hyperlink{conspage_8c_source_l00061}{make\+\_\+cons\+\_\+page()}}, and \mbox{\hyperlink{conspage_8h_source_l00040}{NCONSPAGES}}.



Referenced by \mbox{\hyperlink{init_8c_source_l00206}{main()}}.

\Hypertarget{conspage_8c_a4c4c78e7fc8fb93ca030af51fba71c1c}\label{conspage_8c_a4c4c78e7fc8fb93ca030af51fba71c1c} 
\index{conspage.c@{conspage.c}!make\_cons\_page@{make\_cons\_page}}
\index{make\_cons\_page@{make\_cons\_page}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{make\_cons\_page()}{make\_cons\_page()}}
{\footnotesize\ttfamily void make\+\_\+cons\+\_\+page (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Make a cons page. 

Initialise all cells and prepend each to the freelist; if {\ttfamily initialised\+\_\+cons\+\_\+pages} is zero, do not prepend cells 0 and 1 to the freelist but initialise them as NIL and T respectively. \begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000005}{Todo}}]we ought to handle cons space exhaustion more gracefully than just crashing; should probably return an exception instead, although obviously that exception would have to have been pre-\/built. \end{DoxyRefDesc}


Definition at line \mbox{\hyperlink{conspage_8c_source_l00061}{61}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



References \mbox{\hyperlink{conspage_8h_source_l00049}{cons\+\_\+page\+::cell}}, \mbox{\hyperlink{conspage_8c_source_l00051}{conspages}}, \mbox{\hyperlink{conspage_8h_source_l00024}{CONSPAGESIZE}}, \mbox{\hyperlink{consspaceobject_8h_source_l00635}{cons\+\_\+space\+\_\+object\+::count}}, \mbox{\hyperlink{debug_8h_source_l00021}{DEBUG\+\_\+\+ALLOC}}, \mbox{\hyperlink{debug_8c_source_l00101}{debug\+\_\+printf()}}, \mbox{\hyperlink{conspage_8c_source_l00046}{freelist}}, \mbox{\hyperlink{consspaceobject_8h_source_l00063}{FREETAG}}, \mbox{\hyperlink{conspage_8c_source_l00040}{initialised\+\_\+cons\+\_\+pages}}, \mbox{\hyperlink{consspaceobject_8h_source_l00287}{MAXREFERENCE}}, \mbox{\hyperlink{consspaceobject_8h_source_l00277}{NIL}}, \mbox{\hyperlink{consspaceobject_8h_source_l00152}{NILTAG}}, \mbox{\hyperlink{consspaceobject_8h_source_l00419}{cons\+\_\+pointer\+::offset}}, \mbox{\hyperlink{consspaceobject_8h_source_l00417}{cons\+\_\+pointer\+::page}}, \mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{cons\+\_\+space\+\_\+object\+::payload}}, \mbox{\hyperlink{consspaceobject_8h_a21cb645ce4ae20308447dcd59534bf38}{cons\+\_\+space\+\_\+object\+::tag}}, \mbox{\hyperlink{consspaceobject_8h_source_l00030}{TAGLENGTH}}, and \mbox{\hyperlink{consspaceobject_8h_source_l00247}{TRUETAG}}.



Referenced by \mbox{\hyperlink{conspage_8c_source_l00222}{allocate\+\_\+cell()}}, and \mbox{\hyperlink{conspage_8c_source_l00257}{initialise\+\_\+cons\+\_\+pages()}}.

\Hypertarget{conspage_8c_ab8d9d6417f194dca8d8322301cf37c7c}\label{conspage_8c_ab8d9d6417f194dca8d8322301cf37c7c} 
\index{conspage.c@{conspage.c}!summarise\_allocation@{summarise\_allocation}}
\index{summarise\_allocation@{summarise\_allocation}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{summarise\_allocation()}{summarise\_allocation()}}
{\footnotesize\ttfamily void summarise\+\_\+allocation (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{conspage_8c_source_l00271}{271}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



References \mbox{\hyperlink{conspage_8c_source_l00034}{total\+\_\+cells\+\_\+allocated}}, and \mbox{\hyperlink{conspage_8c_source_l00035}{total\+\_\+cells\+\_\+freed}}.



Referenced by \mbox{\hyperlink{init_8c_source_l00206}{main()}}.



\doxysubsection{Variable Documentation}
\Hypertarget{conspage_8c_a6797b106f2c4921b50e4ec8f20d561f1}\label{conspage_8c_a6797b106f2c4921b50e4ec8f20d561f1} 
\index{conspage.c@{conspage.c}!conspageinitihasbeencalled@{conspageinitihasbeencalled}}
\index{conspageinitihasbeencalled@{conspageinitihasbeencalled}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{conspageinitihasbeencalled}{conspageinitihasbeencalled}}
{\footnotesize\ttfamily bool conspageinitihasbeencalled = false}



Flag indicating whether conspage initialisation has been done. 



Definition at line \mbox{\hyperlink{conspage_8c_source_l00029}{29}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



Referenced by \mbox{\hyperlink{conspage_8c_source_l00257}{initialise\+\_\+cons\+\_\+pages()}}.

\Hypertarget{conspage_8c_a7cce1a2d3dd8b5abe5e30622d94e6959}\label{conspage_8c_a7cce1a2d3dd8b5abe5e30622d94e6959} 
\index{conspage.c@{conspage.c}!conspages@{conspages}}
\index{conspages@{conspages}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{conspages}{conspages}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{conspage_8h_structcons__page}{cons\+\_\+page}}\texorpdfstring{$\ast$}{*} conspages\mbox{[}\mbox{\hyperlink{conspage_8h_a2656b2b52cfab9ff1a7f8cf63e5d111f}{NCONSPAGES}}\mbox{]}}



An array of pointers to cons pages. 



Definition at line \mbox{\hyperlink{conspage_8c_source_l00051}{51}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



Referenced by \mbox{\hyperlink{conspage_8c_source_l00257}{initialise\+\_\+cons\+\_\+pages()}}, and \mbox{\hyperlink{conspage_8c_source_l00061}{make\+\_\+cons\+\_\+page()}}.

\Hypertarget{conspage_8c_ae0a20197a96d9f07dac864b925cd0f32}\label{conspage_8c_ae0a20197a96d9f07dac864b925cd0f32} 
\index{conspage.c@{conspage.c}!freelist@{freelist}}
\index{freelist@{freelist}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{freelist}{freelist}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} freelist = \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}}}



The (global) pointer to the (global) freelist. 

Not sure whether this ultimately belongs in this file. 

Definition at line \mbox{\hyperlink{conspage_8c_source_l00046}{46}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



Referenced by \mbox{\hyperlink{conspage_8c_source_l00222}{allocate\+\_\+cell()}}, \mbox{\hyperlink{conspage_8c_source_l00143}{free\+\_\+cell()}}, and \mbox{\hyperlink{conspage_8c_source_l00061}{make\+\_\+cons\+\_\+page()}}.

\Hypertarget{conspage_8c_a5d208b62e1b9701d407cbb38daa2a225}\label{conspage_8c_a5d208b62e1b9701d407cbb38daa2a225} 
\index{conspage.c@{conspage.c}!initialised\_cons\_pages@{initialised\_cons\_pages}}
\index{initialised\_cons\_pages@{initialised\_cons\_pages}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{initialised\_cons\_pages}{initialised\_cons\_pages}}
{\footnotesize\ttfamily int initialised\+\_\+cons\+\_\+pages = 0}



the number of cons pages which have thus far been initialised. 



Definition at line \mbox{\hyperlink{conspage_8c_source_l00040}{40}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



Referenced by \mbox{\hyperlink{conspage_8c_source_l00124}{dump\+\_\+pages()}}, and \mbox{\hyperlink{conspage_8c_source_l00061}{make\+\_\+cons\+\_\+page()}}.

\Hypertarget{conspage_8c_a9439a14783e93d3b50b984002c8b18cb}\label{conspage_8c_a9439a14783e93d3b50b984002c8b18cb} 
\index{conspage.c@{conspage.c}!total\_cells\_allocated@{total\_cells\_allocated}}
\index{total\_cells\_allocated@{total\_cells\_allocated}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{total\_cells\_allocated}{total\_cells\_allocated}}
{\footnotesize\ttfamily uint64\+\_\+t total\+\_\+cells\+\_\+allocated = 0}



keep track of total cells allocated and freed to check for leakage. 



Definition at line \mbox{\hyperlink{conspage_8c_source_l00034}{34}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



Referenced by \mbox{\hyperlink{conspage_8c_source_l00222}{allocate\+\_\+cell()}}, and \mbox{\hyperlink{conspage_8c_source_l00271}{summarise\+\_\+allocation()}}.

\Hypertarget{conspage_8c_a0ab1cafb4664d438d2cd75ab587035f0}\label{conspage_8c_a0ab1cafb4664d438d2cd75ab587035f0} 
\index{conspage.c@{conspage.c}!total\_cells\_freed@{total\_cells\_freed}}
\index{total\_cells\_freed@{total\_cells\_freed}!conspage.c@{conspage.c}}
\doxysubsubsection{\texorpdfstring{total\_cells\_freed}{total\_cells\_freed}}
{\footnotesize\ttfamily uint64\+\_\+t total\+\_\+cells\+\_\+freed = 0}



Definition at line \mbox{\hyperlink{conspage_8c_source_l00035}{35}} of file \mbox{\hyperlink{conspage_8c_source}{conspage.\+c}}.



Referenced by \mbox{\hyperlink{conspage_8c_source_l00143}{free\+\_\+cell()}}, and \mbox{\hyperlink{conspage_8c_source_l00271}{summarise\+\_\+allocation()}}.

