\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 
\hypertarget{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{typedef struct \+\_\+\+Eina\+\_\+\+Mempool \hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool}}\label{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}

\begin{DoxyCompactList}\small\item\em The opaque type for the mempool structure. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Memory__Pool__Group_gaad1bbde75fe98f5cff269c0411678ff9}{typedef struct \\*
\+\_\+\+Eina\+\_\+\+Mempool\+\_\+\+Backend \hyperlink{group__Eina__Memory__Pool__Group_gaad1bbde75fe98f5cff269c0411678ff9}{Eina\+\_\+\+Mempool\+\_\+\+Backend}}\label{group__Eina__Memory__Pool__Group_gaad1bbde75fe98f5cff269c0411678ff9}

\begin{DoxyCompactList}\small\item\em The opaque type for the mempool backend type. \end{DoxyCompactList}\item 
typedef void($\ast$ \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 
\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool} $\ast$ \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 \hyperlink{group__Eina__Memory__Pool__Group_ga08462e7e67031eb416ffab31e9c2a6cc}{eina\+\_\+mempool\+\_\+del} (\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$ \hyperlink{group__Eina__Memory__Pool__Group_ga7f15747ff472c6f051299284d64b5983}{eina\+\_\+mempool\+\_\+realloc} (\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$ \hyperlink{group__Eina__Memory__Pool__Group_gabbdb8f387ae2e475f743ca86ef980d08}{eina\+\_\+mempool\+\_\+malloc} (\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$ \hyperlink{group__Eina__Memory__Pool__Group_gab9f29782c01cb62d2b70bc65c6fa5e1b}{eina\+\_\+mempool\+\_\+calloc} (\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool} $\ast$mp, unsigned int size)
\begin{DoxyCompactList}\small\item\em Allocate and zero memory using the given mempool. \end{DoxyCompactList}\item 
static void \hyperlink{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}{eina\+\_\+mempool\+\_\+free} (\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool} $\ast$mp, void $\ast$element)
\begin{DoxyCompactList}\small\item\em Free resources previously allocated by the given mempool. \end{DoxyCompactList}\item 
void \hyperlink{group__Eina__Memory__Pool__Group_ga54f212b90f7a16dffd803e38cb9b401e}{eina\+\_\+mempool\+\_\+repack} (\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool} $\ast$mp, \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 \hyperlink{group__Eina__Memory__Pool__Group_ga82e20bb9b578f1430b8446af118afccd}{eina\+\_\+mempool\+\_\+gc} (\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool} $\ast$mp)
\begin{DoxyCompactList}\small\item\em Run a garbage collection cycle. \end{DoxyCompactList}\item 
void \hyperlink{group__Eina__Memory__Pool__Group_ga86cf0b5dcb42ebbb6e9314dd56916f45}{eina\+\_\+mempool\+\_\+statistics} (\hyperlink{group__Eina__Memory__Pool__Group_ga8ca45185c6759c6c7b57e7c1b614215a}{Eina\+\_\+\+Mempool} $\ast$mp)
\begin{DoxyCompactList}\small\item\em Have the backend update its internal statistics. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Memory__Pool__Group_gae11448767cf8ca94752df0ca1f54221e}{eina\+\_\+mempool\+\_\+register} (\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 \hyperlink{group__Eina__Memory__Pool__Group_ga6e284c95e35391579a77f24581ad3304}{eina\+\_\+mempool\+\_\+unregister} (\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 \hyperlink{group__Eina__Memory__Pool__Group_gaf91146872014f8a8df3abe29b83356fe}{eina\+\_\+mempool\+\_\+alignof} (unsigned int size)
\begin{DoxyCompactList}\small\item\em Computers the alignment that would be used when allocating a object of size {\ttfamily size}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Memory__Pool__Group_gacbc6db834ac68b83684f83e55193be4a}{\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\+L\+E}}\label{group__Eina__Memory__Pool__Group_gacbc6db834ac68b83684f83e55193be4a}

\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\+M\+B). \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}
\hypertarget{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[{Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb}]{\setlength{\rightskip}{0pt plus 5cm}Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb}}\label{group__Eina__Memory__Pool__Group_ga36987f282791adfc0d82c493af4462dc}


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 O\+S.

\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}
\hypertarget{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[{eina\+\_\+mempool\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}{\bf 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}
)}}\label{group__Eina__Memory__Pool__Group_ga1df8063ccdcaf88b18e9eefac810f148}


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\+L\+L otherwise. 
\end{DoxyReturn}


References D\+B\+G.



Referenced by edje\+\_\+init(), and eina\+\_\+cow\+\_\+add().

\hypertarget{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[{eina\+\_\+mempool\+\_\+del}]{\setlength{\rightskip}{0pt plus 5cm}void eina\+\_\+mempool\+\_\+del (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Mempool} $\ast$}]{mp}
\end{DoxyParamCaption}
)}}\label{group__Eina__Memory__Pool__Group_ga08462e7e67031eb416ffab31e9c2a6cc}


Deletes the given mempool. 


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


References D\+B\+G.



Referenced by edje\+\_\+init(), and eina\+\_\+cow\+\_\+del().

\hypertarget{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[{eina\+\_\+mempool\+\_\+realloc}]{\setlength{\rightskip}{0pt plus 5cm}static void$\ast$ eina\+\_\+mempool\+\_\+realloc (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Mempool} $\ast$}]{mp, }
\item[{void $\ast$}]{element, }
\item[{unsigned int}]{size}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Memory__Pool__Group_ga7f15747ff472c6f051299284d64b5983}


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 \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}
\hyperlink{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}{eina\+\_\+mempool\+\_\+free()} 
\end{DoxySeeAlso}
\hypertarget{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[{eina\+\_\+mempool\+\_\+malloc}]{\setlength{\rightskip}{0pt plus 5cm}static void$\ast$ eina\+\_\+mempool\+\_\+malloc (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Mempool} $\ast$}]{mp, }
\item[{unsigned int}]{size}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Memory__Pool__Group_gabbdb8f387ae2e475f743ca86ef980d08}


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 \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}
\hyperlink{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}{eina\+\_\+mempool\+\_\+free()} 
\end{DoxySeeAlso}


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

\hypertarget{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[{eina\+\_\+mempool\+\_\+calloc}]{\setlength{\rightskip}{0pt plus 5cm}static void$\ast$ eina\+\_\+mempool\+\_\+calloc (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Mempool} $\ast$}]{mp, }
\item[{unsigned int}]{size}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Memory__Pool__Group_gab9f29782c01cb62d2b70bc65c6fa5e1b}


Allocate and zero 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 \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}
\hyperlink{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}{eina\+\_\+mempool\+\_\+free()} 
\end{DoxySeeAlso}
\hypertarget{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[{eina\+\_\+mempool\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}static void eina\+\_\+mempool\+\_\+free (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Mempool} $\ast$}]{mp, }
\item[{void $\ast$}]{element}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Memory__Pool__Group_gab863371d668381f7bca07d6fafcc2fc2}


Free 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 \hyperlink{group__Eina__Memory__Pool__Group_gabbdb8f387ae2e475f743ca86ef980d08}{eina\+\_\+mempool\+\_\+malloc()}, \hyperlink{group__Eina__Memory__Pool__Group_gab9f29782c01cb62d2b70bc65c6fa5e1b}{eina\+\_\+mempool\+\_\+calloc()}, or \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}
\hyperlink{group__Eina__Memory__Pool__Group_gabbdb8f387ae2e475f743ca86ef980d08}{eina\+\_\+mempool\+\_\+malloc()} 

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

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


Referenced by edje\+\_\+edit\+\_\+part\+\_\+del(), eina\+\_\+cow\+\_\+free(), eina\+\_\+rectangle\+\_\+free(), eina\+\_\+rectangle\+\_\+pool\+\_\+free(), eina\+\_\+rectangle\+\_\+pool\+\_\+release(), eina\+\_\+simple\+\_\+xml\+\_\+attribute\+\_\+free(), eina\+\_\+value\+\_\+array\+\_\+new(), eina\+\_\+value\+\_\+free(), eina\+\_\+value\+\_\+hash\+\_\+new(), eina\+\_\+value\+\_\+list\+\_\+new(), and eina\+\_\+value\+\_\+struct\+\_\+new().

\hypertarget{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[{eina\+\_\+mempool\+\_\+repack}]{\setlength{\rightskip}{0pt plus 5cm}void eina\+\_\+mempool\+\_\+repack (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Mempool} $\ast$}]{mp, }
\item[{{\bf Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb}}]{cb, }
\item[{void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Eina__Memory__Pool__Group_ga54f212b90f7a16dffd803e38cb9b401e}


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}
\hyperlink{group__Eina__Memory__Pool__Group_ga36987f282791adfc0d82c493af4462dc}{Eina\+\_\+\+Mempool\+\_\+\+Repack\+\_\+\+Cb} 

\+\_\+\+Eina\+\_\+\+Mempool\+\_\+\+Backend 
\end{DoxySeeAlso}


References D\+B\+G.

\hypertarget{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[{eina\+\_\+mempool\+\_\+gc}]{\setlength{\rightskip}{0pt plus 5cm}void eina\+\_\+mempool\+\_\+gc (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Mempool} $\ast$}]{mp}
\end{DoxyParamCaption}
)}}\label{group__Eina__Memory__Pool__Group_ga82e20bb9b578f1430b8446af118afccd}


Run a garbage collection cycle. 


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


References D\+B\+G.

\hypertarget{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[{eina\+\_\+mempool\+\_\+statistics}]{\setlength{\rightskip}{0pt plus 5cm}void eina\+\_\+mempool\+\_\+statistics (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Mempool} $\ast$}]{mp}
\end{DoxyParamCaption}
)}}\label{group__Eina__Memory__Pool__Group_ga86cf0b5dcb42ebbb6e9314dd56916f45}


Have the backend update its internal statistics. 


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


References D\+B\+G.

\hypertarget{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[{eina\+\_\+mempool\+\_\+register}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Bool} eina\+\_\+mempool\+\_\+register (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Mempool\+\_\+\+Backend} $\ast$}]{be}
\end{DoxyParamCaption}
)}}\label{group__Eina__Memory__Pool__Group_gae11448767cf8ca94752df0ca1f54221e}


Registers the given memory pool backend. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em be} & The backend \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if backend has been correctly registered, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise. 
\end{DoxyReturn}


References D\+B\+G, and eina\+\_\+hash\+\_\+add().

\hypertarget{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[{eina\+\_\+mempool\+\_\+unregister}]{\setlength{\rightskip}{0pt plus 5cm}void eina\+\_\+mempool\+\_\+unregister (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Mempool\+\_\+\+Backend} $\ast$}]{be}
\end{DoxyParamCaption}
)}}\label{group__Eina__Memory__Pool__Group_ga6e284c95e35391579a77f24581ad3304}


Unregisters the given memory pool backend. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em be} & The backend \\
\hline
\end{DoxyParams}


References D\+B\+G, and eina\+\_\+hash\+\_\+del().

\hypertarget{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[{eina\+\_\+mempool\+\_\+alignof}]{\setlength{\rightskip}{0pt plus 5cm}static unsigned int eina\+\_\+mempool\+\_\+alignof (
\begin{DoxyParamCaption}
\item[{unsigned int}]{size}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Memory__Pool__Group_gaf91146872014f8a8df3abe29b83356fe}


Computers 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\+L\+Y.



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

