\hypertarget{group__Eina__Lalloc__Group}{}\section{Lazy allocator}
\label{group__Eina__Lalloc__Group}\index{Lazy allocator@{Lazy allocator}}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__Eina__Lalloc__Group_ga2b04dacffe74ace34f0fbc802455196b}{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+OC}}(function)~((\mbox{\hyperlink{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}{Eina\+\_\+\+Lalloc\+\_\+\+Alloc}})function)
\item 
\#define \mbox{\hyperlink{group__Eina__Lalloc__Group_gacc84984ae22852ae9e1c35401c00b63a}{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+EE}}(function)~((\mbox{\hyperlink{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}{Eina\+\_\+\+Lalloc\+\_\+\+Free}})function)
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}\label{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}} 
typedef \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}($\ast$ \mbox{\hyperlink{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}{Eina\+\_\+\+Lalloc\+\_\+\+Alloc}}) (void $\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 
\mbox{\Hypertarget{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}\label{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}} 
typedef void($\ast$ \mbox{\hyperlink{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}{Eina\+\_\+\+Lalloc\+\_\+\+Free}}) (void $\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 
\mbox{\Hypertarget{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}\label{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}} 
typedef struct \+\_\+\+Eina\+\_\+\+Lalloc \mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}}
\begin{DoxyCompactList}\small\item\em Public type definition for a lazy allocator. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} $\ast$ \mbox{\hyperlink{group__Eina__Lalloc__Group_gadb8a19e3be32e45a33ac5970d4432063}{eina\+\_\+lalloc\+\_\+new}} (void $\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) \mbox{\hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}}(2
\begin{DoxyCompactList}\small\item\em Creates a new lazy allocator. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void \mbox{\hyperlink{group__Eina__Lalloc__Group_ga7f3dbbd57d05675fce1210ef354a7452}{eina\+\_\+lalloc\+\_\+free}} (\mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} $\ast$a) \mbox{\hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}}(1)
\begin{DoxyCompactList}\small\item\em Frees the resources for a lazy allocator. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Lalloc__Group_ga648c517a4c58a9e154d2edf5c5ea3917}{eina\+\_\+lalloc\+\_\+element\+\_\+add}} (\mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} $\ast$a) \mbox{\hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}}(1)
\begin{DoxyCompactList}\small\item\em Allocates one more of whatever the lazy allocator is allocating. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Lalloc__Group_gab45d54215ae083b1d89deb11c958dc1b}{eina\+\_\+lalloc\+\_\+elements\+\_\+add}} (\mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} $\ast$a, int num) \mbox{\hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+LL}}(1)
\begin{DoxyCompactList}\small\item\em Adds several elements to a lazy allocator. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__Lalloc__Group_ga2b04dacffe74ace34f0fbc802455196b}\label{group__Eina__Lalloc__Group_ga2b04dacffe74ace34f0fbc802455196b}} 
\index{Lazy allocator@{Lazy allocator}!E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+OC@{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+OC}}
\index{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+OC@{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+OC}!Lazy allocator@{Lazy allocator}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+OC}{EINA\_LALLOC\_ALLOC}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+A\+L\+L\+OC(\begin{DoxyParamCaption}\item[{}]{function }\end{DoxyParamCaption})~((\mbox{\hyperlink{group__Eina__Lalloc__Group_ga3bbe349e7e708ea5dda867567bbf3cde}{Eina\+\_\+\+Lalloc\+\_\+\+Alloc}})function)}


\begin{DoxyParams}{Parameters}
{\em function} & The function to allocate. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Lalloc__Group_gacc84984ae22852ae9e1c35401c00b63a}\label{group__Eina__Lalloc__Group_gacc84984ae22852ae9e1c35401c00b63a}} 
\index{Lazy allocator@{Lazy allocator}!E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+EE@{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+EE}}
\index{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+EE@{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+EE}!Lazy allocator@{Lazy allocator}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+EE}{EINA\_LALLOC\_FREE}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+L\+A\+L\+L\+O\+C\+\_\+\+F\+R\+EE(\begin{DoxyParamCaption}\item[{}]{function }\end{DoxyParamCaption})~((\mbox{\hyperlink{group__Eina__Lalloc__Group_ga463b767ad18035ff516de3800b924a2e}{Eina\+\_\+\+Lalloc\+\_\+\+Free}})function)}


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


\subsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Lalloc__Group_gadb8a19e3be32e45a33ac5970d4432063}\label{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{\texorpdfstring{eina\+\_\+lalloc\+\_\+new()}{eina\_lalloc\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} $\ast$ eina\+\_\+lalloc\+\_\+new (\begin{DoxyParamCaption}\item[{void $\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{\tt in}  & {\em data} & The data for which memory will be allocated. \\
\hline
\mbox{\tt in}  & {\em alloc\+\_\+cb} & The callback to allocate memory for {\ttfamily data} items. \\
\hline
\mbox{\tt in}  & {\em free\+\_\+cb} & The callback to free memory for {\ttfamily data} items. \\
\hline
\mbox{\tt 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}
\mbox{\Hypertarget{group__Eina__Lalloc__Group_ga7f3dbbd57d05675fce1210ef354a7452}\label{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{\texorpdfstring{eina\+\_\+lalloc\+\_\+free()}{eina\_lalloc\_free()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void eina\+\_\+lalloc\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Lalloc__Group_ga218ad7aab6e1fac77df6e95d299b7014}{Eina\+\_\+\+Lalloc}} $\ast$}]{a }\end{DoxyParamCaption})}



Frees the resources for a lazy allocator. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em a} & The lazy allocator to free. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Lalloc__Group_ga648c517a4c58a9e154d2edf5c5ea3917}\label{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{\texorpdfstring{eina\+\_\+lalloc\+\_\+element\+\_\+add()}{eina\_lalloc\_element\_add()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \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}} $\ast$}]{a }\end{DoxyParamCaption})}



Allocates one more of whatever the lazy allocator is allocating. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em a} & The lazy allocator to add an item to.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, else \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}}. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Lalloc__Group_gab45d54215ae083b1d89deb11c958dc1b}\label{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{\texorpdfstring{eina\+\_\+lalloc\+\_\+elements\+\_\+add()}{eina\_lalloc\_elements\_add()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \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}} $\ast$}]{a,  }\item[{int}]{num }\end{DoxyParamCaption})}



Adds several elements to a lazy allocator. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em a} & The lazy allocator to add items to. \\
\hline
\mbox{\tt in}  & {\em num} & The number of elements to add.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, else \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}}. 
\end{DoxyReturn}
