\hypertarget{group__Eina__Lalloc__Group}{}\section{Lazy allocator}
\label{group__Eina__Lalloc__Group}\index{Lazy allocator@{Lazy allocator}}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{group__Eina__Lalloc__Group_ga2b04dacffe74ace34f0fbc802455196b}{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+O\+C}(function)~((\hyperlink{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}{Eina\+\_\+\+Lalloc\+\_\+\+Alloc})function)
\item 
\#define \hyperlink{group__Eina__Lalloc__Group_gacc84984ae22852ae9e1c35401c00b63a}{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+E\+E}(function)~((\hyperlink{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}{Eina\+\_\+\+Lalloc\+\_\+\+Free})function)
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}{}typedef \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}($\ast$ \hyperlink{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}{Eina\+\_\+\+Lalloc\+\_\+\+Alloc}) (void $\ast$user\+\_\+data, int num)\label{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}

\begin{DoxyCompactList}\small\item\em Type definition for the callback used to allocate new items in a lazy allocator. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}{}typedef void($\ast$ \hyperlink{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}{Eina\+\_\+\+Lalloc\+\_\+\+Free}) (void $\ast$user\+\_\+data)\label{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}

\begin{DoxyCompactList}\small\item\em Type definition for the callback used to allocate new items in a lazy allocator. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{}typedef struct \+\_\+\+Eina\+\_\+\+Lalloc \hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}\label{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}

\begin{DoxyCompactList}\small\item\em Public type definition for a lazy allocator. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc} $\ast$ \hyperlink{group__Eina__Lalloc__Group_gadb8a19e3be32e45a33ac5970d4432063}{eina\+\_\+lalloc\+\_\+new} (void $\ast$data, \hyperlink{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}{Eina\+\_\+\+Lalloc\+\_\+\+Alloc} alloc\+\_\+cb, \hyperlink{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}{Eina\+\_\+\+Lalloc\+\_\+\+Free} free\+\_\+cb, int num\+\_\+init) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(2
\begin{DoxyCompactList}\small\item\em Create a new lazy allocator. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Eina__Lalloc__Group_ga7f3dbbd57d05675fce1210ef354a7452}{eina\+\_\+lalloc\+\_\+free} (\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc} $\ast$a) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)
\begin{DoxyCompactList}\small\item\em Free the resources for a lazy allocator. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lalloc__Group_ga648c517a4c58a9e154d2edf5c5ea3917}{eina\+\_\+lalloc\+\_\+element\+\_\+add} (\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc} $\ast$a) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)
\begin{DoxyCompactList}\small\item\em Allocate one more of whatever the lazy allocator is allocating. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lalloc__Group_gab45d54215ae083b1d89deb11c958dc1b}{eina\+\_\+lalloc\+\_\+elements\+\_\+add} (\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc} $\ast$a, int num) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)
\begin{DoxyCompactList}\small\item\em Add several elements to a lazy allocator. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Macro Definition Documentation}
\hypertarget{group__Eina__Lalloc__Group_ga2b04dacffe74ace34f0fbc802455196b}{}\index{Lazy allocator@{Lazy allocator}!E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+O\+C@{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+O\+C}}
\index{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+O\+C@{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+O\+C}!Lazy allocator@{Lazy allocator}}
\subsubsection[{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+O\+C}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+O\+C(
\begin{DoxyParamCaption}
\item[{}]{function}
\end{DoxyParamCaption}
)~(({\bf Eina\+\_\+\+Lalloc\+\_\+\+Alloc})function)}\label{group__Eina__Lalloc__Group_ga2b04dacffe74ace34f0fbc802455196b}

\begin{DoxyParams}{Parameters}
{\em function} & The function to allocate. \\
\hline
\end{DoxyParams}
\hypertarget{group__Eina__Lalloc__Group_gacc84984ae22852ae9e1c35401c00b63a}{}\index{Lazy allocator@{Lazy allocator}!E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+E\+E@{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+E\+E}}
\index{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+E\+E@{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+E\+E}!Lazy allocator@{Lazy allocator}}
\subsubsection[{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+E\+E}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+E\+E(
\begin{DoxyParamCaption}
\item[{}]{function}
\end{DoxyParamCaption}
)~(({\bf Eina\+\_\+\+Lalloc\+\_\+\+Free})function)}\label{group__Eina__Lalloc__Group_gacc84984ae22852ae9e1c35401c00b63a}

\begin{DoxyParams}{Parameters}
{\em function} & The function to free. \\
\hline
\end{DoxyParams}


\subsection{Function Documentation}
\hypertarget{group__Eina__Lalloc__Group_gadb8a19e3be32e45a33ac5970d4432063}{}\index{Lazy allocator@{Lazy allocator}!eina\+\_\+lalloc\+\_\+new@{eina\+\_\+lalloc\+\_\+new}}
\index{eina\+\_\+lalloc\+\_\+new@{eina\+\_\+lalloc\+\_\+new}!Lazy allocator@{Lazy allocator}}
\subsubsection[{eina\+\_\+lalloc\+\_\+new(void $\ast$data, Eina\+\_\+\+Lalloc\+\_\+\+Alloc alloc\+\_\+cb, Eina\+\_\+\+Lalloc\+\_\+\+Free free\+\_\+cb, int num\+\_\+init) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(2}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Lalloc} $\ast$ eina\+\_\+lalloc\+\_\+new (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{data, }
\item[{{\bf Eina\+\_\+\+Lalloc\+\_\+\+Alloc}}]{alloc\+\_\+cb, }
\item[{{\bf Eina\+\_\+\+Lalloc\+\_\+\+Free}}]{free\+\_\+cb, }
\item[{int}]{num\+\_\+init}
\end{DoxyParamCaption}
)}\label{group__Eina__Lalloc__Group_gadb8a19e3be32e45a33ac5970d4432063}


Create a new lazy allocator. 


\begin{DoxyParams}{Parameters}
{\em data} & The data for which memory will be allocated. \\
\hline
{\em alloc\+\_\+cb} & The callback to allocate memory for {\ttfamily data} items. \\
\hline
{\em free\+\_\+cb} & The callback to free memory for {\ttfamily data} items. \\
\hline
{\em num\+\_\+init} & The number of {\ttfamily data} items to initally allocate space for.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new lazy allocator. 
\end{DoxyReturn}
\hypertarget{group__Eina__Lalloc__Group_ga7f3dbbd57d05675fce1210ef354a7452}{}\index{Lazy allocator@{Lazy allocator}!eina\+\_\+lalloc\+\_\+free@{eina\+\_\+lalloc\+\_\+free}}
\index{eina\+\_\+lalloc\+\_\+free@{eina\+\_\+lalloc\+\_\+free}!Lazy allocator@{Lazy allocator}}
\subsubsection[{eina\+\_\+lalloc\+\_\+free(\+Eina\+\_\+\+Lalloc $\ast$a) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Lalloc} {\bf E\+A\+P\+I} void eina\+\_\+lalloc\+\_\+free (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Lalloc} $\ast$}]{a}
\end{DoxyParamCaption}
)}\label{group__Eina__Lalloc__Group_ga7f3dbbd57d05675fce1210ef354a7452}


Free the resources for a lazy allocator. 


\begin{DoxyParams}{Parameters}
{\em a} & The lazy allocator to free. \\
\hline
\end{DoxyParams}
\hypertarget{group__Eina__Lalloc__Group_ga648c517a4c58a9e154d2edf5c5ea3917}{}\index{Lazy allocator@{Lazy allocator}!eina\+\_\+lalloc\+\_\+element\+\_\+add@{eina\+\_\+lalloc\+\_\+element\+\_\+add}}
\index{eina\+\_\+lalloc\+\_\+element\+\_\+add@{eina\+\_\+lalloc\+\_\+element\+\_\+add}!Lazy allocator@{Lazy allocator}}
\subsubsection[{eina\+\_\+lalloc\+\_\+element\+\_\+add(\+Eina\+\_\+\+Lalloc $\ast$a) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} eina\+\_\+lalloc\+\_\+element\+\_\+add (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Lalloc} $\ast$}]{a}
\end{DoxyParamCaption}
)}\label{group__Eina__Lalloc__Group_ga648c517a4c58a9e154d2edf5c5ea3917}


Allocate one more of whatever the lazy allocator is allocating. 


\begin{DoxyParams}{Parameters}
{\em a} & The lazy allocator to add an item to.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+U\+E on success, else E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E. 
\end{DoxyReturn}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E, and E\+I\+N\+A\+\_\+\+T\+R\+U\+E.

\hypertarget{group__Eina__Lalloc__Group_gab45d54215ae083b1d89deb11c958dc1b}{}\index{Lazy allocator@{Lazy allocator}!eina\+\_\+lalloc\+\_\+elements\+\_\+add@{eina\+\_\+lalloc\+\_\+elements\+\_\+add}}
\index{eina\+\_\+lalloc\+\_\+elements\+\_\+add@{eina\+\_\+lalloc\+\_\+elements\+\_\+add}!Lazy allocator@{Lazy allocator}}
\subsubsection[{eina\+\_\+lalloc\+\_\+elements\+\_\+add(\+Eina\+\_\+\+Lalloc $\ast$a, int num) E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L(1)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} eina\+\_\+lalloc\+\_\+elements\+\_\+add (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Lalloc} $\ast$}]{a, }
\item[{int}]{num}
\end{DoxyParamCaption}
)}\label{group__Eina__Lalloc__Group_gab45d54215ae083b1d89deb11c958dc1b}


Add several elements to a lazy allocator. 


\begin{DoxyParams}{Parameters}
{\em a} & The lazy allocater to add items to. \\
\hline
{\em num} & The number of elements to add.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+U\+E on success, else E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E. 
\end{DoxyReturn}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E, and E\+I\+N\+A\+\_\+\+T\+R\+U\+E.

