\doxysubsubsection{Lazy allocator}
\hypertarget{group__Eina__Lalloc__Group}{}\label{group__Eina__Lalloc__Group}\index{Lazy allocator@{Lazy allocator}}
\doxysubsubsubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__Eina__Lalloc__Group_ga2b04dacffe74ace34f0fbc802455196b}{EINA\+\_\+\+LALLOC\+\_\+\+ALLOC}}(function)~((\mbox{\hyperlink{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}{Eina\+\_\+\+Lalloc\+\_\+\+Alloc}})function)
\item 
\#define \mbox{\hyperlink{group__Eina__Lalloc__Group_gacc84984ae22852ae9e1c35401c00b63a}{EINA\+\_\+\+LALLOC\+\_\+\+FREE}}(function)~((\mbox{\hyperlink{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}{Eina\+\_\+\+Lalloc\+\_\+\+Free}})function)
\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}\label{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde} 
typedef \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}(\texorpdfstring{$\ast$}{*} {\bfseries Eina\+\_\+\+Lalloc\+\_\+\+Alloc}) (void \texorpdfstring{$\ast$}{*}user\+\_\+data, int num)
\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}\label{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e} 
typedef void(\texorpdfstring{$\ast$}{*} {\bfseries Eina\+\_\+\+Lalloc\+\_\+\+Free}) (void \texorpdfstring{$\ast$}{*}user\+\_\+data)
\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}\label{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014} 
typedef struct \+\_\+\+Eina\+\_\+\+Lalloc {\bfseries Eina\+\_\+\+Lalloc}
\begin{DoxyCompactList}\small\item\em Public type definition for a lazy allocator. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Lalloc__Group_ga01e0f9650795ebe11c4d56d64fff1573}{eina\+\_\+lalloc\+\_\+new}} (void \texorpdfstring{$\ast$}{*}data, \mbox{\hyperlink{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}{Eina\+\_\+\+Lalloc\+\_\+\+Alloc}} alloc\+\_\+cb, \mbox{\hyperlink{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}{Eina\+\_\+\+Lalloc\+\_\+\+Free}} free\+\_\+cb, int num\+\_\+init)
\begin{DoxyCompactList}\small\item\em Creates a new lazy allocator. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Lalloc__Group_ga212d5d5f9d9f392c68c14d4d34c72f09}{eina\+\_\+lalloc\+\_\+free}} (\mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} \texorpdfstring{$\ast$}{*}a)
\begin{DoxyCompactList}\small\item\em Frees the resources for a lazy allocator. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Lalloc__Group_ga439ad026c43fdafcc6c51b8317a45b8b}{eina\+\_\+lalloc\+\_\+element\+\_\+add}} (\mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} \texorpdfstring{$\ast$}{*}a)
\begin{DoxyCompactList}\small\item\em Allocates one more of whatever the lazy allocator is allocating. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Lalloc__Group_gaf60f547b374b3808c692468a4a3bd8e6}{eina\+\_\+lalloc\+\_\+elements\+\_\+add}} (\mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} \texorpdfstring{$\ast$}{*}a, int num)
\begin{DoxyCompactList}\small\item\em Adds several elements to a lazy allocator. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsubsubsection{Detailed Description}




\doxysubsubsubsection{Macro Definition Documentation}
\Hypertarget{group__Eina__Lalloc__Group_ga2b04dacffe74ace34f0fbc802455196b}\label{group__Eina__Lalloc__Group_ga2b04dacffe74ace34f0fbc802455196b} 
\index{Lazy allocator@{Lazy allocator}!EINA\_LALLOC\_ALLOC@{EINA\_LALLOC\_ALLOC}}
\index{EINA\_LALLOC\_ALLOC@{EINA\_LALLOC\_ALLOC}!Lazy allocator@{Lazy allocator}}
\doxysubsubsubsubsection{\texorpdfstring{EINA\_LALLOC\_ALLOC}{EINA\_LALLOC\_ALLOC}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+LALLOC\+\_\+\+ALLOC(\begin{DoxyParamCaption}\item[{}]{function }\end{DoxyParamCaption})~((\mbox{\hyperlink{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}{Eina\+\_\+\+Lalloc\+\_\+\+Alloc}})function)}


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em function} & The function to allocate. \\
\hline
\end{DoxyParams}
\Hypertarget{group__Eina__Lalloc__Group_gacc84984ae22852ae9e1c35401c00b63a}\label{group__Eina__Lalloc__Group_gacc84984ae22852ae9e1c35401c00b63a} 
\index{Lazy allocator@{Lazy allocator}!EINA\_LALLOC\_FREE@{EINA\_LALLOC\_FREE}}
\index{EINA\_LALLOC\_FREE@{EINA\_LALLOC\_FREE}!Lazy allocator@{Lazy allocator}}
\doxysubsubsubsubsection{\texorpdfstring{EINA\_LALLOC\_FREE}{EINA\_LALLOC\_FREE}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+LALLOC\+\_\+\+FREE(\begin{DoxyParamCaption}\item[{}]{function }\end{DoxyParamCaption})~((\mbox{\hyperlink{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}{Eina\+\_\+\+Lalloc\+\_\+\+Free}})function)}


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em function} & The function to free. \\
\hline
\end{DoxyParams}


\doxysubsubsubsection{Function Documentation}
\Hypertarget{group__Eina__Lalloc__Group_ga01e0f9650795ebe11c4d56d64fff1573}\label{group__Eina__Lalloc__Group_ga01e0f9650795ebe11c4d56d64fff1573} 
\index{Lazy allocator@{Lazy allocator}!eina\_lalloc\_new@{eina\_lalloc\_new}}
\index{eina\_lalloc\_new@{eina\_lalloc\_new}!Lazy allocator@{Lazy allocator}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_lalloc\_new()}{eina\_lalloc\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} \texorpdfstring{$\ast$}{*} eina\+\_\+lalloc\+\_\+new (\begin{DoxyParamCaption}\item[{void \texorpdfstring{$\ast$}{*}}]{data,  }\item[{\mbox{\hyperlink{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}{Eina\+\_\+\+Lalloc\+\_\+\+Alloc}}}]{alloc\+\_\+cb,  }\item[{\mbox{\hyperlink{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}{Eina\+\_\+\+Lalloc\+\_\+\+Free}}}]{free\+\_\+cb,  }\item[{int}]{num\+\_\+init }\end{DoxyParamCaption})}



Creates a new lazy allocator. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em data} & The data for which memory will be allocated. \\
\hline
\mbox{\texttt{ in}}  & {\em alloc\+\_\+cb} & The callback to allocate memory for {\ttfamily data} items. \\
\hline
\mbox{\texttt{ in}}  & {\em free\+\_\+cb} & The callback to free memory for {\ttfamily data} items. \\
\hline
\mbox{\texttt{ in}}  & {\em num\+\_\+init} & The number of {\ttfamily data} items to initially allocate space for.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new lazy allocator. 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

\Hypertarget{group__Eina__Lalloc__Group_ga212d5d5f9d9f392c68c14d4d34c72f09}\label{group__Eina__Lalloc__Group_ga212d5d5f9d9f392c68c14d4d34c72f09} 
\index{Lazy allocator@{Lazy allocator}!eina\_lalloc\_free@{eina\_lalloc\_free}}
\index{eina\_lalloc\_free@{eina\_lalloc\_free}!Lazy allocator@{Lazy allocator}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_lalloc\_free()}{eina\_lalloc\_free()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+lalloc\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} \texorpdfstring{$\ast$}{*}}]{a }\end{DoxyParamCaption})}



Frees the resources for a lazy allocator. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em a} & The lazy allocator to free. \\
\hline
\end{DoxyParams}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1ccf8538d0015b3801ff642e6156843a}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN}}.

\Hypertarget{group__Eina__Lalloc__Group_ga439ad026c43fdafcc6c51b8317a45b8b}\label{group__Eina__Lalloc__Group_ga439ad026c43fdafcc6c51b8317a45b8b} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_lalloc\_element\_add()}{eina\_lalloc\_element\_add()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+lalloc\+\_\+element\+\_\+add (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} \texorpdfstring{$\ast$}{*}}]{a }\end{DoxyParamCaption})}



Allocates one more of whatever the lazy allocator is allocating. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em a} & The lazy allocator to add an item to.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\doxylink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE} on success, else \doxylink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}. 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

\Hypertarget{group__Eina__Lalloc__Group_gaf60f547b374b3808c692468a4a3bd8e6}\label{group__Eina__Lalloc__Group_gaf60f547b374b3808c692468a4a3bd8e6} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_lalloc\_elements\_add()}{eina\_lalloc\_elements\_add()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+lalloc\+\_\+elements\+\_\+add (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} \texorpdfstring{$\ast$}{*}}]{a,  }\item[{int}]{num }\end{DoxyParamCaption})}



Adds several elements to a lazy allocator. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em a} & The lazy allocator to add items to. \\
\hline
\mbox{\texttt{ in}}  & {\em num} & The number of elements to add.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\doxylink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE} on success, else \doxylink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}. 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

