\section{malloc.h File Reference}
\label{malloc.h}\index{malloc.h@{malloc.h}}
Header for a simple implementation of malloc(). 


\subsection*{Compounds}
\begin{CompactItemize}
\item 
struct {\bf smalloc\_\-hunk}
\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\label{malloc.h_a0}
\index{MALLOC_FREE@{MALLOC\_\-FREE}!malloc.h@{malloc.h}}\index{malloc.h@{malloc.h}!MALLOC_FREE@{MALLOC\_\-FREE}}
\#define {\bf MALLOC\_\-FREE}
\begin{CompactList}\small\item\em The malloc hunk flags Note: Cound have used a negative size a'la TI.\item\end{CompactList}

\item 
\#define {\bf MALLOC\_\-MAGIC}
\begin{CompactList}\small\item\em Magic number of a header.\item\end{CompactList}

\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\label{malloc.h_a5}
\index{mmalloc_hunk@{mmalloc\_\-hunk}!malloc.h@{malloc.h}}\index{malloc.h@{malloc.h}!mmalloc_hunk@{mmalloc\_\-hunk}}
typedef struct smalloc\_\-hunk {\bf mmalloc\_\-hunk}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\label{malloc.h_a3}
\index{malloc_gc@{malloc\_\-gc}!malloc.h@{malloc.h}}\index{malloc.h@{malloc.h}!malloc_gc@{malloc\_\-gc}}
void {\bf malloc\_\-gc} (void) NONBANKED
\begin{CompactList}\small\item\em Garbage collect (join free hunks).\item\end{CompactList}

\item 
\label{malloc.h_a4}
\index{debug@{debug}!malloc.h@{malloc.h}}\index{malloc.h@{malloc.h}!debug@{debug}}
void {\bf debug} ( char $\ast$routine, char $\ast$msg ) NONBANKED
\begin{CompactList}\small\item\em debug message logger.\item\end{CompactList}

\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\label{malloc.h_a6}
\index{pmmalloc_hunk@{pmmalloc\_\-hunk}!malloc.h@{malloc.h}}\index{malloc.h@{malloc.h}!pmmalloc_hunk@{pmmalloc\_\-hunk}}
struct smalloc\_\-hunk$\ast$ {\bf pmmalloc\_\-hunk}
\item 
\label{malloc.h_a7}
\index{malloc_heap_start@{malloc\_\-heap\_\-start}!malloc.h@{malloc.h}}\index{malloc.h@{malloc.h}!malloc_heap_start@{malloc\_\-heap\_\-start}}
{\bf UBYTE} {\bf malloc\_\-heap\_\-start}
\begin{CompactList}\small\item\em Start of free memory, as defined by the linker.\item\end{CompactList}

\item 
\label{malloc.h_a8}
\index{malloc_first@{malloc\_\-first}!malloc.h@{malloc.h}}\index{malloc.h@{malloc.h}!malloc_first@{malloc\_\-first}}
pmmalloc\_\-hunk {\bf malloc\_\-first}
\begin{CompactList}\small\item\em First hunk.\item\end{CompactList}

\end{CompactItemize}
\vspace{0.4cm}\hrule\vspace{0.2cm}
\subsection*{Detailed Description}
Header for a simple implementation of malloc().

This library may currently be broken. \vspace{0.4cm}\hrule\vspace{0.2cm}
\subsection*{Define Documentation}
\label{malloc.h_a2}
\index{malloc.h@{malloc.h}!MALLOC_MAGIC@{MALLOC\_\-MAGIC}}
\index{MALLOC_MAGIC@{MALLOC\_\-MAGIC}!malloc.h@{malloc.h}}
\subsection{\setlength{\rightskip}{0pt plus 5cm}\#define MALLOC\_\-MAGIC ()}

Magic number of a header.

Gives us some chance of surviving if the list is corrupted 