\section{lib/common/memory.h File Reference}
\label{memory_8h}\index{lib/common/memory.\-h@{lib/common/memory.\-h}}
{\ttfamily \#include $<$stdlib.\-h$>$}\\*
Include dependency graph for memory.\-h\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=157pt]{memory_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{memory_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bf N\-E\-W}(t)~(t$\ast$){\bf zmalloc}(sizeof(t))
\item 
\#define {\bf N\-\_\-\-N\-E\-W}(n, t)~(t$\ast$){\bf zmalloc}((n)$\ast$sizeof(t))
\item 
\#define {\bf G\-N\-E\-W}(t)~(t$\ast$){\bf gmalloc}(sizeof(t))
\item 
\#define {\bf N\-\_\-\-G\-N\-E\-W}(n, t)~(t$\ast$){\bf gmalloc}((n)$\ast$sizeof(t))
\item 
\#define {\bf N\-\_\-\-G\-G\-N\-E\-W}(n, t)~(t$\ast$)malloc((n)$\ast$sizeof(t))
\item 
\#define {\bf A\-L\-L\-O\-C}(size, ptr, type)~(ptr? (type$\ast$){\bf grealloc}(ptr,(size)$\ast$sizeof(type))\-:(type$\ast$){\bf gmalloc}((size)$\ast$sizeof(type)))
\item 
\#define {\bf R\-A\-L\-L\-O\-C}(size, ptr, type)~((type$\ast$){\bf grealloc}(ptr,(size)$\ast$sizeof(type)))
\item 
\#define {\bf Z\-A\-L\-L\-O\-C}(size, ptr, type, osize)~(ptr? (type$\ast$){\bf zrealloc}(ptr,size,sizeof(type),osize)\-:(type$\ast$){\bf zmalloc}((size)$\ast$sizeof(type)))
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void $\ast$ {\bf zmalloc} (size\-\_\-t)
\item 
void $\ast$ {\bf zrealloc} (void $\ast$, size\-\_\-t, size\-\_\-t, size\-\_\-t)
\item 
void $\ast$ {\bf gmalloc} (size\-\_\-t)
\item 
void $\ast$ {\bf grealloc} (void $\ast$, size\-\_\-t)
\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{memory.\-h@{memory.\-h}!A\-L\-L\-O\-C@{A\-L\-L\-O\-C}}
\index{A\-L\-L\-O\-C@{A\-L\-L\-O\-C}!memory.h@{memory.\-h}}
\subsubsection[{A\-L\-L\-O\-C}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-L\-L\-O\-C(
\begin{DoxyParamCaption}
\item[{}]{size, }
\item[{}]{ptr, }
\item[{}]{type}
\end{DoxyParamCaption}
)~(ptr? (type$\ast$){\bf grealloc}(ptr,(size)$\ast$sizeof(type))\-:(type$\ast$){\bf gmalloc}((size)$\ast$sizeof(type)))}\label{memory_8h_afff066b1a9aeba23d3c19af72e3e4b92}


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



Referenced by box\-\_\-connection(), class2(), move\-\_\-node(), new\-\_\-spline(), and simple\-Spline\-Route().

\index{memory.\-h@{memory.\-h}!G\-N\-E\-W@{G\-N\-E\-W}}
\index{G\-N\-E\-W@{G\-N\-E\-W}!memory.h@{memory.\-h}}
\subsubsection[{G\-N\-E\-W}]{\setlength{\rightskip}{0pt plus 5cm}\#define G\-N\-E\-W(
\begin{DoxyParamCaption}
\item[{}]{t}
\end{DoxyParamCaption}
)~(t$\ast$){\bf gmalloc}(sizeof(t))}\label{memory_8h_a29d7782d147543570ab50f35d52626ed}


Definition at line 37 of file memory.\-h.



Referenced by Double\-Linked\-List\-\_\-new(), getfree(), gvplugin\-\_\-install(), mk\-Grid(), Multilevel\-\_\-control\-\_\-new(), new\-P\-M(), new\-Queue(), Operator\-\_\-matmul\-\_\-new(), Single\-Linked\-List\-\_\-new(), and Stress\-Majorization\-Smoother2\-\_\-new().

\index{memory.\-h@{memory.\-h}!N\-\_\-\-G\-G\-N\-E\-W@{N\-\_\-\-G\-G\-N\-E\-W}}
\index{N\-\_\-\-G\-G\-N\-E\-W@{N\-\_\-\-G\-G\-N\-E\-W}!memory.h@{memory.\-h}}
\subsubsection[{N\-\_\-\-G\-G\-N\-E\-W}]{\setlength{\rightskip}{0pt plus 5cm}\#define N\-\_\-\-G\-G\-N\-E\-W(
\begin{DoxyParamCaption}
\item[{}]{n, }
\item[{}]{t}
\end{DoxyParamCaption}
)~(t$\ast$)malloc((n)$\ast$sizeof(t))}\label{memory_8h_a3131125d82a3f2aeb790bdc2daa6f7e9}


Definition at line 40 of file memory.\-h.

\index{memory.\-h@{memory.\-h}!N\-\_\-\-G\-N\-E\-W@{N\-\_\-\-G\-N\-E\-W}}
\index{N\-\_\-\-G\-N\-E\-W@{N\-\_\-\-G\-N\-E\-W}!memory.h@{memory.\-h}}
\subsubsection[{N\-\_\-\-G\-N\-E\-W}]{\setlength{\rightskip}{0pt plus 5cm}\#define N\-\_\-\-G\-N\-E\-W(
\begin{DoxyParamCaption}
\item[{}]{n, }
\item[{}]{t}
\end{DoxyParamCaption}
)~(t$\ast$){\bf gmalloc}((n)$\ast$sizeof(t))}\label{memory_8h_ad879f57c222c8bb9a977853d9aba4820}


Definition at line 39 of file memory.\-h.

\index{memory.\-h@{memory.\-h}!N\-\_\-\-N\-E\-W@{N\-\_\-\-N\-E\-W}}
\index{N\-\_\-\-N\-E\-W@{N\-\_\-\-N\-E\-W}!memory.h@{memory.\-h}}
\subsubsection[{N\-\_\-\-N\-E\-W}]{\setlength{\rightskip}{0pt plus 5cm}\#define N\-\_\-\-N\-E\-W(
\begin{DoxyParamCaption}
\item[{}]{n, }
\item[{}]{t}
\end{DoxyParamCaption}
)~(t$\ast$){\bf zmalloc}((n)$\ast$sizeof(t))}\label{memory_8h_aff1e0aa083474362a4f0b485ccaeef41}


Definition at line 36 of file memory.\-h.



Referenced by allocate\-\_\-ranks(), attached\-\_\-clustering(), build\-\_\-skeleton(), circuit\-Model(), compound\-Edges(), compute\-\_\-apsp\-\_\-artifical\-\_\-weights\-\_\-packed(), compute\-\_\-apsp\-\_\-packed(), conjugate\-\_\-gradient\-\_\-mkernel(), dotneato\-\_\-args\-\_\-initialize(), emit\-\_\-map\-\_\-rect(), fdp\-\_\-init\-\_\-node\-\_\-edge(), find\-C\-Comp(), Import\-\_\-coord\-\_\-clusters\-\_\-from\-\_\-dot(), lu\-\_\-decompose(), make\-Dot\-Graph(), make\-Matrix(), make\-Obstacle(), make\-Straight\-Edge(), matinv(), mk\-Router(), neato\-\_\-init\-\_\-node(), neato\-\_\-layout(), new\-\_\-array(), new\-\_\-queue(), new\-\_\-spline(), points\-Of(), put\-Graphs(), round\-\_\-corners(), scan\-\_\-graph\-\_\-mode(), shortest\-\_\-path(), size\-Array(), size\-Linear\-Array(), Sparse\-Matrix\-\_\-import\-\_\-dot(), stress\-\_\-majorization\-\_\-k\-D\-\_\-mkernel(), tree\-\_\-map(), and undo\-Cluster\-Edges().

\index{memory.\-h@{memory.\-h}!N\-E\-W@{N\-E\-W}}
\index{N\-E\-W@{N\-E\-W}!memory.h@{memory.\-h}}
\subsubsection[{N\-E\-W}]{\setlength{\rightskip}{0pt plus 5cm}\#define N\-E\-W(
\begin{DoxyParamCaption}
\item[{}]{t}
\end{DoxyParamCaption}
)~(t$\ast$){\bf zmalloc}(sizeof(t))}\label{memory_8h_ad47bcaeb6a32d146af1ad46876b1e083}


Definition at line 35 of file memory.\-h.



Referenced by circomps(), compound\-Edges(), epsf\-\_\-init(), find\-C\-Comp(), graph\-\_\-init(), make\-\_\-aux\-\_\-edge(), make\-\_\-label(), make\-Obstacle(), mk\-Block(), mk\-Nodelist(), mk\-Router(), mk\-Stack(), new\-\_\-queue(), new\-\_\-spline(), new\-\_\-virtual\-\_\-edge(), taper(), virtual\-\_\-node(), and xdot\-B\-B().

\index{memory.\-h@{memory.\-h}!R\-A\-L\-L\-O\-C@{R\-A\-L\-L\-O\-C}}
\index{R\-A\-L\-L\-O\-C@{R\-A\-L\-L\-O\-C}!memory.h@{memory.\-h}}
\subsubsection[{R\-A\-L\-L\-O\-C}]{\setlength{\rightskip}{0pt plus 5cm}\#define R\-A\-L\-L\-O\-C(
\begin{DoxyParamCaption}
\item[{}]{size, }
\item[{}]{ptr, }
\item[{}]{type}
\end{DoxyParamCaption}
)~((type$\ast$){\bf grealloc}(ptr,(size)$\ast$sizeof(type)))}\label{memory_8h_a8f12ad65a57ee348f57416fc1d862727}


Definition at line 42 of file memory.\-h.



Referenced by cccomps(), ccomps(), gv\-Plugin\-List(), and pccomps().

\index{memory.\-h@{memory.\-h}!Z\-A\-L\-L\-O\-C@{Z\-A\-L\-L\-O\-C}}
\index{Z\-A\-L\-L\-O\-C@{Z\-A\-L\-L\-O\-C}!memory.h@{memory.\-h}}
\subsubsection[{Z\-A\-L\-L\-O\-C}]{\setlength{\rightskip}{0pt plus 5cm}\#define Z\-A\-L\-L\-O\-C(
\begin{DoxyParamCaption}
\item[{}]{size, }
\item[{}]{ptr, }
\item[{}]{type, }
\item[{}]{osize}
\end{DoxyParamCaption}
)~(ptr? (type$\ast$){\bf zrealloc}(ptr,size,sizeof(type),osize)\-:(type$\ast$){\bf zmalloc}((size)$\ast$sizeof(type)))}\label{memory_8h_a29c9f42d7e809c1bfedebe70ff3e1b6a}


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



\subsection{Function Documentation}
\index{memory.\-h@{memory.\-h}!gmalloc@{gmalloc}}
\index{gmalloc@{gmalloc}!memory.h@{memory.\-h}}
\subsubsection[{gmalloc}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ gmalloc (
\begin{DoxyParamCaption}
\item[{size\-\_\-t}]{}
\end{DoxyParamCaption}
)}\label{memory_8h_abb4435a0c13d5fc85f5ca61bbf76ce92}


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



References N\-U\-L\-L.



Referenced by getfree(), gvconfig(), gvconfig\-\_\-plugin\-\_\-install\-\_\-from\-\_\-library(), gvplugin\-\_\-library\-\_\-load(), gvprintf(), html\-\_\-string(), xml\-\_\-string0(), xml\-\_\-url\-\_\-string(), and zmalloc().

\index{memory.\-h@{memory.\-h}!grealloc@{grealloc}}
\index{grealloc@{grealloc}!memory.h@{memory.\-h}}
\subsubsection[{grealloc}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ grealloc (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{, }
\item[{size\-\_\-t}]{}
\end{DoxyParamCaption}
)}\label{memory_8h_a126aff4c007afda4b8b4fdc95a58942d}


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



References N\-U\-L\-L.



Referenced by canontoken(), colorxlate(), Fgets(), graph\-\_\-init(), gv\-\_\-argvlist\-\_\-set\-\_\-item(), gvplugin\-\_\-library\-\_\-load(), gvrender\-\_\-beziercurve(), gvrender\-\_\-polygon(), gvrender\-\_\-polyline(), html\-\_\-string(), xml\-\_\-string0(), and xml\-\_\-url\-\_\-string().

\index{memory.\-h@{memory.\-h}!zmalloc@{zmalloc}}
\index{zmalloc@{zmalloc}!memory.h@{memory.\-h}}
\subsubsection[{zmalloc}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ zmalloc (
\begin{DoxyParamCaption}
\item[{size\-\_\-t}]{}
\end{DoxyParamCaption}
)}\label{memory_8h_a02cf5aa3b49bbd479983a1932a99de23}


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

\index{memory.\-h@{memory.\-h}!zrealloc@{zrealloc}}
\index{zrealloc@{zrealloc}!memory.h@{memory.\-h}}
\subsubsection[{zrealloc}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ zrealloc (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{, }
\item[{size\-\_\-t}]{, }
\item[{size\-\_\-t}]{, }
\item[{size\-\_\-t}]{}
\end{DoxyParamCaption}
)}\label{memory_8h_a3921df993e20e1d3bf5bd71f99cadbc6}


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



References N\-U\-L\-L.

