\hypertarget{allocator_8h}{\section{ompi/mca/allocator/allocator.h File Reference}
\label{allocator_8h}\index{ompi/mca/allocator/allocator.\+h@{ompi/mca/allocator/allocator.\+h}}
}


Copyright (c) 2004-\/2005 The Trustees of Indiana University and Indiana University Research and Technology Corporation.  


{\ttfamily \#include \char`\"{}ompi\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/mca.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/mpool/mpool.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structmca__allocator__base__module__t}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+t}
\begin{DoxyCompactList}\small\item\em The data structure for each component. \end{DoxyCompactList}\item 
struct \hyperlink{structmca__allocator__base__component__2__0__0__t}{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+2\+\_\+0\+\_\+0\+\_\+t}
\begin{DoxyCompactList}\small\item\em The data structure provided by each component to the framework which describes the component. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{allocator_8h_a4f31d5c3875a66db4fcbe4a4eb127322}{M\+C\+A\+\_\+\+A\+L\+L\+O\+C\+A\+T\+O\+R\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0}
\begin{DoxyCompactList}\small\item\em Macro for use in components that are of type allocator. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{allocator_8h_a93f92ccc83b09df3f4e325790fb7e567}{typedef void $\ast$($\ast$ \hyperlink{allocator_8h_a93f92ccc83b09df3f4e325790fb7e567}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+alloc\+\_\+fn\+\_\+t} )(struct \hyperlink{structmca__allocator__base__module__t}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+t} $\ast$, size\+\_\+t size, size\+\_\+t align, \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$$\ast$registration)}\label{allocator_8h_a93f92ccc83b09df3f4e325790fb7e567}

\begin{DoxyCompactList}\small\item\em The allocate function typedef for the function to be provided by the component. \end{DoxyCompactList}\item 
\hypertarget{allocator_8h_aa85400ef39ae70e02ca763cda7e73605}{typedef void $\ast$($\ast$ \hyperlink{allocator_8h_aa85400ef39ae70e02ca763cda7e73605}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+realloc\+\_\+fn\+\_\+t} )(struct \hyperlink{structmca__allocator__base__module__t}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+t} $\ast$, void $\ast$, size\+\_\+t, \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$$\ast$registration)}\label{allocator_8h_aa85400ef39ae70e02ca763cda7e73605}

\begin{DoxyCompactList}\small\item\em The realloc function typedef. \end{DoxyCompactList}\item 
\hypertarget{allocator_8h_a15eae1def48176a8116017681c762e00}{typedef void($\ast$ \hyperlink{allocator_8h_a15eae1def48176a8116017681c762e00}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+free\+\_\+fn\+\_\+t} )(struct \hyperlink{structmca__allocator__base__module__t}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+t} $\ast$, void $\ast$)}\label{allocator_8h_a15eae1def48176a8116017681c762e00}

\begin{DoxyCompactList}\small\item\em Free function typedef. \end{DoxyCompactList}\item 
\hypertarget{allocator_8h_a4f88563431da67e25b0e0cbd946a89f3}{typedef int($\ast$ \hyperlink{allocator_8h_a4f88563431da67e25b0e0cbd946a89f3}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+compact\+\_\+fn\+\_\+t} )(struct \hyperlink{structmca__allocator__base__module__t}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+t} $\ast$allocator)}\label{allocator_8h_a4f88563431da67e25b0e0cbd946a89f3}

\begin{DoxyCompactList}\small\item\em compact/return memory to higher level allocator \end{DoxyCompactList}\item 
\hypertarget{allocator_8h_a8fead05a53a030ba4da8540749fd76ae}{typedef int($\ast$ \hyperlink{allocator_8h_a8fead05a53a030ba4da8540749fd76ae}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+finalize\+\_\+fn\+\_\+t} )(struct \hyperlink{structmca__allocator__base__module__t}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+t} $\ast$allocator)}\label{allocator_8h_a8fead05a53a030ba4da8540749fd76ae}

\begin{DoxyCompactList}\small\item\em cleanup (free) any resources held by allocator \end{DoxyCompactList}\item 
\hypertarget{allocator_8h_a51c869485a68430dafaa5fee91652852}{typedef struct \\*
\hyperlink{structmca__allocator__base__module__t}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+t} \hyperlink{allocator_8h_a51c869485a68430dafaa5fee91652852}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+t}}\label{allocator_8h_a51c869485a68430dafaa5fee91652852}

\begin{DoxyCompactList}\small\item\em Convenience typedef. \end{DoxyCompactList}\item 
typedef void $\ast$($\ast$ \hyperlink{allocator_8h_a5472d80a69d79779b45fe4d01276ff6c}{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+alloc\+\_\+fn\+\_\+t} )(struct \hyperlink{structmca__mpool__base__module__t}{mca\+\_\+mpool\+\_\+base\+\_\+module\+\_\+t} $\ast$module, size\+\_\+t $\ast$size, \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$$\ast$registration)
\begin{DoxyCompactList}\small\item\em A function to get more memory from the system. \end{DoxyCompactList}\item 
typedef void($\ast$ \hyperlink{allocator_8h_a33e0a8ba4ad4dd42764679363fa38faf}{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+free\+\_\+fn\+\_\+t} )(struct \hyperlink{structmca__mpool__base__module__t}{mca\+\_\+mpool\+\_\+base\+\_\+module\+\_\+t} $\ast$module, void $\ast$segment)
\begin{DoxyCompactList}\small\item\em A function to free memory from the control of the allocator framework back to the system. \end{DoxyCompactList}\item 
\hypertarget{allocator_8h_a1de024a9778e064daab27a51a8065537}{typedef struct \\*
\hyperlink{structmca__allocator__base__module__t}{mca\+\_\+allocator\+\_\+base\+\_\+module\+\_\+t} $\ast$($\ast$ \hyperlink{allocator_8h_a1de024a9778e064daab27a51a8065537}{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+init\+\_\+fn\+\_\+t} )(bool enable\+\_\+mpi\+\_\+threads, \hyperlink{allocator_8h_a5472d80a69d79779b45fe4d01276ff6c}{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+alloc\+\_\+fn\+\_\+t} segment\+\_\+alloc, \hyperlink{allocator_8h_a33e0a8ba4ad4dd42764679363fa38faf}{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+free\+\_\+fn\+\_\+t} segment\+\_\+free, struct \hyperlink{structmca__mpool__base__module__t}{mca\+\_\+mpool\+\_\+base\+\_\+module\+\_\+t} $\ast$mpool)}\label{allocator_8h_a1de024a9778e064daab27a51a8065537}

\begin{DoxyCompactList}\small\item\em The function used to initialize the component. \end{DoxyCompactList}\item 
\hypertarget{allocator_8h_adba0f37f8491efef97cc54cc69966bb8}{typedef struct \\*
\hyperlink{structmca__allocator__base__component__2__0__0__t}{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+2\+\_\+0\+\_\+0\+\_\+t} \hyperlink{allocator_8h_adba0f37f8491efef97cc54cc69966bb8}{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+t}}\label{allocator_8h_adba0f37f8491efef97cc54cc69966bb8}

\begin{DoxyCompactList}\small\item\em Convenience typedef. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{allocator_8h_a89508b79a99107a2278b7400af661942}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{allocator_8h_a89508b79a99107a2278b7400af661942}{mca\+\_\+allocator\+\_\+base\+\_\+output}}\label{allocator_8h_a89508b79a99107a2278b7400af661942}

\begin{DoxyCompactList}\small\item\em The output integer used for the mca base. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Copyright (c) 2004-\/2005 The Trustees of Indiana University and Indiana University Research and Technology Corporation. 

All rights reserved. Copyright (c) 2004-\/2006 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved. Copyright (c) 2004-\/2005 High Performance Computing Center Stuttgart, University of Stuttgart. All rights reserved. Copyright (c) 2004-\/2005 The Regents of the University of California. All rights reserved. \$\+C\+O\+P\+Y\+R\+I\+G\+H\+T\$

Additional copyrights may follow

\$\+H\+E\+A\+D\+E\+R\$

The public definition of the M\+C\+A Allocator framework. 

\subsection{Macro Definition Documentation}
\hypertarget{allocator_8h_a4f31d5c3875a66db4fcbe4a4eb127322}{\index{allocator.\+h@{allocator.\+h}!M\+C\+A\+\_\+\+A\+L\+L\+O\+C\+A\+T\+O\+R\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0@{M\+C\+A\+\_\+\+A\+L\+L\+O\+C\+A\+T\+O\+R\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0}}
\index{M\+C\+A\+\_\+\+A\+L\+L\+O\+C\+A\+T\+O\+R\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0@{M\+C\+A\+\_\+\+A\+L\+L\+O\+C\+A\+T\+O\+R\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0}!allocator.\+h@{allocator.\+h}}
\subsubsection[{M\+C\+A\+\_\+\+A\+L\+L\+O\+C\+A\+T\+O\+R\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\+C\+A\+\_\+\+A\+L\+L\+O\+C\+A\+T\+O\+R\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0}}\label{allocator_8h_a4f31d5c3875a66db4fcbe4a4eb127322}
{\bfseries Value\+:}
\begin{DoxyCode}
MCA\_BASE\_VERSION\_2\_0\_0, \(\backslash\)
  \textcolor{stringliteral}{"allocator"}, 2, 0, 0
\end{DoxyCode}


Macro for use in components that are of type allocator. 



\subsection{Typedef Documentation}
\hypertarget{allocator_8h_a5472d80a69d79779b45fe4d01276ff6c}{\index{allocator.\+h@{allocator.\+h}!mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+alloc\+\_\+fn\+\_\+t@{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+alloc\+\_\+fn\+\_\+t}}
\index{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+alloc\+\_\+fn\+\_\+t@{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+alloc\+\_\+fn\+\_\+t}!allocator.\+h@{allocator.\+h}}
\subsubsection[{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+alloc\+\_\+fn\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef void$\ast$($\ast$ mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+alloc\+\_\+fn\+\_\+t)(struct {\bf mca\+\_\+mpool\+\_\+base\+\_\+module\+\_\+t} $\ast$module, size\+\_\+t $\ast$size, {\bf mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$$\ast$registration)}}\label{allocator_8h_a5472d80a69d79779b45fe4d01276ff6c}


A function to get more memory from the system. 

This function is to be provided by the module to the allocator framework. \hypertarget{allocator_8h_a33e0a8ba4ad4dd42764679363fa38faf}{\index{allocator.\+h@{allocator.\+h}!mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+free\+\_\+fn\+\_\+t@{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+free\+\_\+fn\+\_\+t}}
\index{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+free\+\_\+fn\+\_\+t@{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+free\+\_\+fn\+\_\+t}!allocator.\+h@{allocator.\+h}}
\subsubsection[{mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+free\+\_\+fn\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ mca\+\_\+allocator\+\_\+base\+\_\+component\+\_\+segment\+\_\+free\+\_\+fn\+\_\+t)(struct {\bf mca\+\_\+mpool\+\_\+base\+\_\+module\+\_\+t} $\ast$module, void $\ast$segment)}}\label{allocator_8h_a33e0a8ba4ad4dd42764679363fa38faf}


A function to free memory from the control of the allocator framework back to the system. 

This function is to be provided by the module to the allocator framework. 