\hypertarget{group__Eina__Memory__Pool__Group}{}\section{Memory Pool}
\label{group__Eina__Memory__Pool__Group}\index{Memory Pool@{Memory Pool}}


This group discusses the functions that provide memory pool management.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}\label{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}} 
typedef struct \+\_\+\+Eina\+\_\+\+Mempool \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}}
\begin{DoxyCompactList}\small\item\em The opaque type for the mempool structure. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_gaad1bbde75fe98f5cff269c0411678ff9}\label{group__Eina__Memory__Pool__Group_gaad1bbde75fe98f5cff269c0411678ff9}} 
typedef struct \+\_\+\+Eina\+\_\+\+Mempool\+\_\+\+Backend \mbox{\hyperlink{group__Eina__Memory__Pool__Group_gaad1bbde75fe98f5cff269c0411678ff9}{Eina\+\_\+\+Mempool\+\_\+\+Backend}}
\begin{DoxyCompactList}\small\item\em The opaque type for the mempool backend type. \end{DoxyCompactList}\item 
typedef void($\ast$ \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga36987f282791adfc0d82c493af4462dc}{Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb}}) (void $\ast$dst, void $\ast$src, void $\ast$data)
\begin{DoxyCompactList}\small\item\em The callback type which is called when the mempool \char`\"{}repacks\char`\"{} its data. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$ \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga1df8063ccdcaf88b18e9eefac810f148}{eina\+\_\+mempool\+\_\+add}} (const char $\ast$name, const char $\ast$context, const char $\ast$options,...)
\begin{DoxyCompactList}\small\item\em Creates a new mempool of the given type. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga08462e7e67031eb416ffab31e9c2a6cc}{eina\+\_\+mempool\+\_\+del}} (\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$mp)
\begin{DoxyCompactList}\small\item\em Deletes the given mempool. \end{DoxyCompactList}\item 
static void $\ast$ \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga7f15747ff472c6f051299284d64b5983}{eina\+\_\+mempool\+\_\+realloc}} (\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$mp, void $\ast$element, unsigned int size)
\begin{DoxyCompactList}\small\item\em Re-\/allocates an amount memory by the given mempool. \end{DoxyCompactList}\item 
static void $\ast$ \mbox{\hyperlink{group__Eina__Memory__Pool__Group_gabbdb8f387ae2e475f743ca86ef980d08}{eina\+\_\+mempool\+\_\+malloc}} (\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$mp, unsigned int size)
\begin{DoxyCompactList}\small\item\em Allocates memory using the given mempool. \end{DoxyCompactList}\item 
static void $\ast$ \mbox{\hyperlink{group__Eina__Memory__Pool__Group_gab9f29782c01cb62d2b70bc65c6fa5e1b}{eina\+\_\+mempool\+\_\+calloc}} (\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$mp, unsigned int size)
\begin{DoxyCompactList}\small\item\em Allocates and zeros memory using the given mempool. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}{eina\+\_\+mempool\+\_\+free}} (\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$mp, void $\ast$element)
\begin{DoxyCompactList}\small\item\em Frees resources previously allocated by the given mempool. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga54f212b90f7a16dffd803e38cb9b401e}{eina\+\_\+mempool\+\_\+repack}} (\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$mp, \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga36987f282791adfc0d82c493af4462dc}{Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb}} cb, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Repacks the objects in the mempool. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga82e20bb9b578f1430b8446af118afccd}{eina\+\_\+mempool\+\_\+gc}} (\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$mp)
\begin{DoxyCompactList}\small\item\em Runs a garbage collection cycle. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga86cf0b5dcb42ebbb6e9314dd56916f45}{eina\+\_\+mempool\+\_\+statistics}} (\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$mp)
\begin{DoxyCompactList}\small\item\em Has the backend update its internal statistics. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Memory__Pool__Group_gae11448767cf8ca94752df0ca1f54221e}{eina\+\_\+mempool\+\_\+register}} (\mbox{\hyperlink{group__Eina__Memory__Pool__Group_gaad1bbde75fe98f5cff269c0411678ff9}{Eina\+\_\+\+Mempool\+\_\+\+Backend}} $\ast$be)
\begin{DoxyCompactList}\small\item\em Registers the given memory pool backend. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga6e284c95e35391579a77f24581ad3304}{eina\+\_\+mempool\+\_\+unregister}} (\mbox{\hyperlink{group__Eina__Memory__Pool__Group_gaad1bbde75fe98f5cff269c0411678ff9}{Eina\+\_\+\+Mempool\+\_\+\+Backend}} $\ast$be)
\begin{DoxyCompactList}\small\item\em Unregisters the given memory pool backend. \end{DoxyCompactList}\item 
static unsigned int \mbox{\hyperlink{group__Eina__Memory__Pool__Group_gaf91146872014f8a8df3abe29b83356fe}{eina\+\_\+mempool\+\_\+alignof}} (unsigned int size)
\begin{DoxyCompactList}\small\item\em Computes the alignment that would be used when allocating a object of size {\ttfamily size}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_gacbc6db834ac68b83684f83e55193be4a}\label{group__Eina__Memory__Pool__Group_gacbc6db834ac68b83684f83e55193be4a}} 
\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} {\bfseries E\+I\+N\+A\+\_\+\+E\+R\+R\+O\+R\+\_\+\+N\+O\+T\+\_\+\+M\+E\+M\+P\+O\+O\+L\+\_\+\+M\+O\+D\+U\+LE}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
This group discusses the functions that provide memory pool management. 

Several mempools are available\+:

\begin{DoxyItemize}
\item {\ttfamily chained\+\_\+pool\+:} It is the default one. It allocates a big chunk of memory with malloc() and splits the result into chunks of the requested size that are pushed inside a stack. When requested, it takes this pointer from the stack to give them to whoever wants them. \item {\ttfamily pass\+\_\+through\+:} it just call malloc() and free(). It may be faster on some computers than using our own allocators (like having a huge L2 cache, over 4\+MB). \item {\ttfamily one\+\_\+big\+:} It calls malloc() just one time for the requested number of items. This is useful when you know in advance how many objects of some type live during the life of the mempool. \end{DoxyItemize}


\subsection{Typedef Documentation}
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_ga36987f282791adfc0d82c493af4462dc}\label{group__Eina__Memory__Pool__Group_ga36987f282791adfc0d82c493af4462dc}} 
\index{Memory Pool@{Memory Pool}!Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb@{Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb}}
\index{Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb@{Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb}{Eina\_Mempool\_Repack\_Cb}}
{\footnotesize\ttfamily Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb}



The callback type which is called when the mempool \char`\"{}repacks\char`\"{} its data. 

I.\+e. moves it around to optimize the way it is stored in memory. This is useful to improve data locality and to free internal pools back to the OS.

\begin{DoxyNote}{Note}
The callback needs to update users of the data to stop accessing the object from the old location and access it using the new location instead. The copy of memory is taken care of by the mempool. 
\end{DoxyNote}


\subsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_ga1df8063ccdcaf88b18e9eefac810f148}\label{group__Eina__Memory__Pool__Group_ga1df8063ccdcaf88b18e9eefac810f148}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+add@{eina\+\_\+mempool\+\_\+add}}
\index{eina\+\_\+mempool\+\_\+add@{eina\+\_\+mempool\+\_\+add}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+add()}{eina\_mempool\_add()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}}$\ast$ eina\+\_\+mempool\+\_\+add (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name,  }\item[{const char $\ast$}]{context,  }\item[{const char $\ast$}]{options,  }\item[{}]{... }\end{DoxyParamCaption})}



Creates a new mempool of the given type. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em name} & Name of the mempool kind to use. \\
\hline
\mbox{\tt in}  & {\em context} & Identifier of the mempool created (for debug purposes). \\
\hline
\mbox{\tt in}  & {\em options} & Unused. Use the variable arguments list instead to pass options to the mempool. \\
\hline
\mbox{\tt in}  & {\em ...} & Additional options to pass to the allocator; depends entirely on the type of mempool (\char`\"{}int pool size\char`\"{} for chained and \char`\"{}int item\+\_\+size\char`\"{} for one\+\_\+big. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Newly allocated mempool instance, N\+U\+LL otherwise. 
\end{DoxyReturn}


Referenced by edje\+\_\+init().

\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_ga08462e7e67031eb416ffab31e9c2a6cc}\label{group__Eina__Memory__Pool__Group_ga08462e7e67031eb416ffab31e9c2a6cc}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+del@{eina\+\_\+mempool\+\_\+del}}
\index{eina\+\_\+mempool\+\_\+del@{eina\+\_\+mempool\+\_\+del}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+del()}{eina\_mempool\_del()}}
{\footnotesize\ttfamily void eina\+\_\+mempool\+\_\+del (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$}]{mp }\end{DoxyParamCaption})}



Deletes the given mempool. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mp} & The mempool to delete \\
\hline
\end{DoxyParams}


Referenced by eina\+\_\+cow\+\_\+del().

\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_ga7f15747ff472c6f051299284d64b5983}\label{group__Eina__Memory__Pool__Group_ga7f15747ff472c6f051299284d64b5983}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+realloc@{eina\+\_\+mempool\+\_\+realloc}}
\index{eina\+\_\+mempool\+\_\+realloc@{eina\+\_\+mempool\+\_\+realloc}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+realloc()}{eina\_mempool\_realloc()}}
{\footnotesize\ttfamily static void$\ast$ eina\+\_\+mempool\+\_\+realloc (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$}]{mp,  }\item[{void $\ast$}]{element,  }\item[{unsigned int}]{size }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Re-\/allocates an amount memory by the given mempool. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mp} & The mempool \\
\hline
\mbox{\tt in}  & {\em element} & The element to re-\/allocate \\
\hline
\mbox{\tt in}  & {\em size} & The size in bytes to re-\/allocate \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The newly re-\/allocated data
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This function re-\/allocates and returns {\ttfamily element} with {\ttfamily size} bytes using the mempool {\ttfamily mp}. If not used anymore, the data must be freed with \mbox{\hyperlink{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}{eina\+\_\+mempool\+\_\+free()}}. 
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
No checks are done for {\ttfamily mp}.
\end{DoxyWarning}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}{eina\+\_\+mempool\+\_\+free()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_gabbdb8f387ae2e475f743ca86ef980d08}\label{group__Eina__Memory__Pool__Group_gabbdb8f387ae2e475f743ca86ef980d08}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+malloc@{eina\+\_\+mempool\+\_\+malloc}}
\index{eina\+\_\+mempool\+\_\+malloc@{eina\+\_\+mempool\+\_\+malloc}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+malloc()}{eina\_mempool\_malloc()}}
{\footnotesize\ttfamily static void$\ast$ eina\+\_\+mempool\+\_\+malloc (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$}]{mp,  }\item[{unsigned int}]{size }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Allocates memory using the given mempool. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mp} & The mempool \\
\hline
\mbox{\tt in}  & {\em size} & The size in bytes to allocate \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The newly allocated data
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This function allocates and returns {\ttfamily size} bytes using the mempool {\ttfamily mp}. If not used anymore, the data must be freed with \mbox{\hyperlink{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}{eina\+\_\+mempool\+\_\+free()}}. 
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
No checks are done for {\ttfamily mp}.
\end{DoxyWarning}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}{eina\+\_\+mempool\+\_\+free()}} 
\end{DoxySeeAlso}


Referenced by eina\+\_\+cow\+\_\+write(), eina\+\_\+rectangle\+\_\+new(), eina\+\_\+simple\+\_\+xml\+\_\+attribute\+\_\+new(), eina\+\_\+simple\+\_\+xml\+\_\+node\+\_\+load(), eina\+\_\+simple\+\_\+xml\+\_\+node\+\_\+tag\+\_\+new(), eina\+\_\+value\+\_\+new(), and eina\+\_\+value\+\_\+struct\+\_\+new().

\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_gab9f29782c01cb62d2b70bc65c6fa5e1b}\label{group__Eina__Memory__Pool__Group_gab9f29782c01cb62d2b70bc65c6fa5e1b}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+calloc@{eina\+\_\+mempool\+\_\+calloc}}
\index{eina\+\_\+mempool\+\_\+calloc@{eina\+\_\+mempool\+\_\+calloc}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+calloc()}{eina\_mempool\_calloc()}}
{\footnotesize\ttfamily static void$\ast$ eina\+\_\+mempool\+\_\+calloc (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$}]{mp,  }\item[{unsigned int}]{size }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Allocates and zeros memory using the given mempool. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mp} & The mempool \\
\hline
\mbox{\tt in}  & {\em size} & The size in bytes to allocate \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The newly allocated data
\end{DoxyReturn}
This function allocates, zeroes, and returns {\ttfamily size} bytes using the mempool {\ttfamily mp}. If not used anymore, the data must be freed with \mbox{\hyperlink{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}{eina\+\_\+mempool\+\_\+free()}}. \begin{DoxyWarning}{Warning}
No checks are done for {\ttfamily mp}.
\end{DoxyWarning}
\begin{DoxySince}{Since}
1.\+2
\end{DoxySince}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}{eina\+\_\+mempool\+\_\+free()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}\label{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+free@{eina\+\_\+mempool\+\_\+free}}
\index{eina\+\_\+mempool\+\_\+free@{eina\+\_\+mempool\+\_\+free}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+free()}{eina\_mempool\_free()}}
{\footnotesize\ttfamily static void eina\+\_\+mempool\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$}]{mp,  }\item[{void $\ast$}]{element }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Frees resources previously allocated by the given mempool. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mp} & The mempool \\
\hline
\mbox{\tt in}  & {\em element} & The data to free\\
\hline
\end{DoxyParams}
This function frees {\ttfamily element} allocated by {\ttfamily mp}. {\ttfamily element} must have been obtained from \mbox{\hyperlink{group__Eina__Memory__Pool__Group_gabbdb8f387ae2e475f743ca86ef980d08}{eina\+\_\+mempool\+\_\+malloc()}}, \mbox{\hyperlink{group__Eina__Memory__Pool__Group_gab9f29782c01cb62d2b70bc65c6fa5e1b}{eina\+\_\+mempool\+\_\+calloc()}}, or \mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga7f15747ff472c6f051299284d64b5983}{eina\+\_\+mempool\+\_\+realloc()}}.

\begin{DoxyWarning}{Warning}
No checks are done for {\ttfamily mp}.
\end{DoxyWarning}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Memory__Pool__Group_gabbdb8f387ae2e475f743ca86ef980d08}{eina\+\_\+mempool\+\_\+malloc()}} 

\mbox{\hyperlink{group__Eina__Memory__Pool__Group_gab9f29782c01cb62d2b70bc65c6fa5e1b}{eina\+\_\+mempool\+\_\+calloc()}} 

\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga7f15747ff472c6f051299284d64b5983}{eina\+\_\+mempool\+\_\+realloc()}} 
\end{DoxySeeAlso}


Referenced by edje\+\_\+edit\+\_\+part\+\_\+del(), eina\+\_\+cow\+\_\+free(), eina\+\_\+simple\+\_\+xml\+\_\+attribute\+\_\+free(), eina\+\_\+value\+\_\+free(), eina\+\_\+value\+\_\+new(), and eina\+\_\+value\+\_\+struct\+\_\+new().

\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_ga54f212b90f7a16dffd803e38cb9b401e}\label{group__Eina__Memory__Pool__Group_ga54f212b90f7a16dffd803e38cb9b401e}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+repack@{eina\+\_\+mempool\+\_\+repack}}
\index{eina\+\_\+mempool\+\_\+repack@{eina\+\_\+mempool\+\_\+repack}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+repack()}{eina\_mempool\_repack()}}
{\footnotesize\ttfamily void eina\+\_\+mempool\+\_\+repack (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$}]{mp,  }\item[{\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga36987f282791adfc0d82c493af4462dc}{Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb}}}]{cb,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})}



Repacks the objects in the mempool. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mp} & The mempool \\
\hline
\mbox{\tt in}  & {\em cb} & A callback to update the pointers the objects with their new location \\
\hline
\mbox{\tt in}  & {\em data} & Data to pass as third argument to {\ttfamily cb} \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga36987f282791adfc0d82c493af4462dc}{Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb}} 

\+\_\+\+Eina\+\_\+\+Mempool\+\_\+\+Backend 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_ga82e20bb9b578f1430b8446af118afccd}\label{group__Eina__Memory__Pool__Group_ga82e20bb9b578f1430b8446af118afccd}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+gc@{eina\+\_\+mempool\+\_\+gc}}
\index{eina\+\_\+mempool\+\_\+gc@{eina\+\_\+mempool\+\_\+gc}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+gc()}{eina\_mempool\_gc()}}
{\footnotesize\ttfamily void eina\+\_\+mempool\+\_\+gc (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$}]{mp }\end{DoxyParamCaption})}



Runs a garbage collection cycle. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mp} & The mempool \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_ga86cf0b5dcb42ebbb6e9314dd56916f45}\label{group__Eina__Memory__Pool__Group_ga86cf0b5dcb42ebbb6e9314dd56916f45}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+statistics@{eina\+\_\+mempool\+\_\+statistics}}
\index{eina\+\_\+mempool\+\_\+statistics@{eina\+\_\+mempool\+\_\+statistics}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+statistics()}{eina\_mempool\_statistics()}}
{\footnotesize\ttfamily void eina\+\_\+mempool\+\_\+statistics (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}} $\ast$}]{mp }\end{DoxyParamCaption})}



Has the backend update its internal statistics. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mp} & The mempool \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_gae11448767cf8ca94752df0ca1f54221e}\label{group__Eina__Memory__Pool__Group_gae11448767cf8ca94752df0ca1f54221e}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+register@{eina\+\_\+mempool\+\_\+register}}
\index{eina\+\_\+mempool\+\_\+register@{eina\+\_\+mempool\+\_\+register}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+register()}{eina\_mempool\_register()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+mempool\+\_\+register (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Memory__Pool__Group_gaad1bbde75fe98f5cff269c0411678ff9}{Eina\+\_\+\+Mempool\+\_\+\+Backend}} $\ast$}]{be }\end{DoxyParamCaption})}



Registers the given memory pool backend. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em be} & The backend \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} if backend has been correctly registered, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} otherwise. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_ga6e284c95e35391579a77f24581ad3304}\label{group__Eina__Memory__Pool__Group_ga6e284c95e35391579a77f24581ad3304}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+unregister@{eina\+\_\+mempool\+\_\+unregister}}
\index{eina\+\_\+mempool\+\_\+unregister@{eina\+\_\+mempool\+\_\+unregister}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+unregister()}{eina\_mempool\_unregister()}}
{\footnotesize\ttfamily void eina\+\_\+mempool\+\_\+unregister (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Memory__Pool__Group_gaad1bbde75fe98f5cff269c0411678ff9}{Eina\+\_\+\+Mempool\+\_\+\+Backend}} $\ast$}]{be }\end{DoxyParamCaption})}



Unregisters the given memory pool backend. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em be} & The backend \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Memory__Pool__Group_gaf91146872014f8a8df3abe29b83356fe}\label{group__Eina__Memory__Pool__Group_gaf91146872014f8a8df3abe29b83356fe}} 
\index{Memory Pool@{Memory Pool}!eina\+\_\+mempool\+\_\+alignof@{eina\+\_\+mempool\+\_\+alignof}}
\index{eina\+\_\+mempool\+\_\+alignof@{eina\+\_\+mempool\+\_\+alignof}!Memory Pool@{Memory Pool}}
\subsubsection{\texorpdfstring{eina\+\_\+mempool\+\_\+alignof()}{eina\_mempool\_alignof()}}
{\footnotesize\ttfamily static unsigned int eina\+\_\+mempool\+\_\+alignof (\begin{DoxyParamCaption}\item[{unsigned int}]{size }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Computes the alignment that would be used when allocating a object of size {\ttfamily size}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em size} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The alignment for an allocation of size {\ttfamily size}. 
\end{DoxyReturn}


References E\+I\+N\+A\+\_\+\+U\+N\+L\+I\+K\+E\+LY.

