\section{lib/neatogen/memory.c File Reference}
\label{neatogen_2memory_8c}\index{lib/neatogen/memory.\-c@{lib/neatogen/memory.\-c}}
{\ttfamily \#include \char`\"{}geometry.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}render.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}mem.\-h\char`\"{}}\\*
{\ttfamily \#include $<$stdlib.\-h$>$}\\*
{\ttfamily \#include $<$stdio.\-h$>$}\\*
Include dependency graph for memory.\-c\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{neatogen_2memory_8c__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct {\bf freenode}
\item 
struct {\bf freeblock}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bf L\-C\-M}(x, y)~((x)\%(y) == 0 ? (x) \-: (y)\%(x) == 0 ? (y) \-: x$\ast$(y/gcd(x,y)))
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct {\bf freenode} {\bf Freenode}
\item 
typedef struct {\bf freeblock} {\bf Freeblock}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void {\bf freeinit} ({\bf Freelist} $\ast$fl, {\bf int} size)
\item 
void $\ast$ {\bf getfree} ({\bf Freelist} $\ast$fl)
\item 
void {\bf makefree} (void $\ast$curr, {\bf Freelist} $\ast$fl)
\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{neatogen/memory.\-c@{neatogen/memory.\-c}!L\-C\-M@{L\-C\-M}}
\index{L\-C\-M@{L\-C\-M}!neatogen/memory.c@{neatogen/memory.\-c}}
\subsubsection[{L\-C\-M}]{\setlength{\rightskip}{0pt plus 5cm}\#define L\-C\-M(
\begin{DoxyParamCaption}
\item[{}]{x, }
\item[{}]{y}
\end{DoxyParamCaption}
)~((x)\%(y) == 0 ? (x) \-: (y)\%(x) == 0 ? (y) \-: x$\ast$(y/gcd(x,y)))}\label{neatogen_2memory_8c_ab4a72e4c6dc95c180a2119446b81e01f}


Definition at line 41 of file memory.\-c.



Referenced by freeinit().



\subsection{Typedef Documentation}
\index{neatogen/memory.\-c@{neatogen/memory.\-c}!Freeblock@{Freeblock}}
\index{Freeblock@{Freeblock}!neatogen/memory.c@{neatogen/memory.\-c}}
\subsubsection[{Freeblock}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf freeblock}  {\bf Freeblock}}\label{neatogen_2memory_8c_a3bf91c5a57cfd797c7a92a5a1450d3c7}
\index{neatogen/memory.\-c@{neatogen/memory.\-c}!Freenode@{Freenode}}
\index{Freenode@{Freenode}!neatogen/memory.c@{neatogen/memory.\-c}}
\subsubsection[{Freenode}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf freenode}  {\bf Freenode}}\label{neatogen_2memory_8c_ac64856ab99ec314674ecf22c2787f75e}


\subsection{Function Documentation}
\index{neatogen/memory.\-c@{neatogen/memory.\-c}!freeinit@{freeinit}}
\index{freeinit@{freeinit}!neatogen/memory.c@{neatogen/memory.\-c}}
\subsubsection[{freeinit}]{\setlength{\rightskip}{0pt plus 5cm}void freeinit (
\begin{DoxyParamCaption}
\item[{{\bf Freelist} $\ast$}]{fl, }
\item[{{\bf int}}]{size}
\end{DoxyParamCaption}
)}\label{neatogen_2memory_8c_a629ac9c3dac3dcaa2e27d77238cf131c}


Definition at line 43 of file memory.\-c.



References freelist\-::blocklist, freelist\-::head, L\-C\-M, freeblock\-::next, freeblock\-::nodes, freelist\-::nodesize, and N\-U\-L\-L.



Referenced by edgeinit(), E\-Lcleanup(), E\-Linitialize(), infoinit(), and siteinit().

\index{neatogen/memory.\-c@{neatogen/memory.\-c}!getfree@{getfree}}
\index{getfree@{getfree}!neatogen/memory.c@{neatogen/memory.\-c}}
\subsubsection[{getfree}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ getfree (
\begin{DoxyParamCaption}
\item[{{\bf Freelist} $\ast$}]{fl}
\end{DoxyParamCaption}
)}\label{neatogen_2memory_8c_afb3f908dbdce185dbe02d8a4ee1685b6}


Definition at line 62 of file memory.\-c.



References freelist\-::blocklist, gmalloc(), G\-N\-E\-W, freelist\-::head, makefree(), freeblock\-::next, freenode\-::nextfree, freeblock\-::nodes, freelist\-::nodesize, N\-U\-L\-L, and sqrt\-\_\-nsites.



Referenced by add\-Vertex(), getsite(), gvbisect(), and H\-Ecreate().

\index{neatogen/memory.\-c@{neatogen/memory.\-c}!makefree@{makefree}}
\index{makefree@{makefree}!neatogen/memory.c@{neatogen/memory.\-c}}
\subsubsection[{makefree}]{\setlength{\rightskip}{0pt plus 5cm}void makefree (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{curr, }
\item[{{\bf Freelist} $\ast$}]{fl}
\end{DoxyParamCaption}
)}\label{neatogen_2memory_8c_a5a8366a682d721830a290e508ad58a2b}


Definition at line 86 of file memory.\-c.



References freelist\-::head.



Referenced by deref(), endpoint(), and getfree().

