\hypertarget{rcache__vma__tree_8c}{\section{ompi/mca/rcache/vma/rcache\+\_\+vma\+\_\+tree.c File Reference}
\label{rcache__vma__tree_8c}\index{ompi/mca/rcache/vma/rcache\+\_\+vma\+\_\+tree.\+c@{ompi/mca/rcache/vma/rcache\+\_\+vma\+\_\+tree.\+c}}
}


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`\"{}rcache\+\_\+vma\+\_\+tree.\+h\char`\"{}}\\*
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{rcache__vma__tree_8c_a2431a026595fadecb70490cb20f243a1}{{\bfseries O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+I\+N\+S\+T\+A\+N\+C\+E} (\hyperlink{structmca__rcache__vma__reg__list__item__t}{mca\+\_\+rcache\+\_\+vma\+\_\+reg\+\_\+list\+\_\+item\+\_\+t}, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t}, N\+U\+L\+L, N\+U\+L\+L)}\label{rcache__vma__tree_8c_a2431a026595fadecb70490cb20f243a1}

\item 
\hypertarget{rcache__vma__tree_8c_af63c3cb00040ff0b20f1a8b257989328}{static void {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+construct} (\hyperlink{structopal__object__t}{opal\+\_\+object\+\_\+t} $\ast$object)}\label{rcache__vma__tree_8c_af63c3cb00040ff0b20f1a8b257989328}

\item 
\hypertarget{rcache__vma__tree_8c_a10b28782f3138c3386d59668ddf3f3fb}{static void {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+destruct} (\hyperlink{structopal__object__t}{opal\+\_\+object\+\_\+t} $\ast$object)}\label{rcache__vma__tree_8c_a10b28782f3138c3386d59668ddf3f3fb}

\item 
\hypertarget{rcache__vma__tree_8c_af078ab18be2129cbf1b9f6f5b214cb51}{{\bfseries O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+I\+N\+S\+T\+A\+N\+C\+E} (\hyperlink{structmca__rcache__vma__t}{mca\+\_\+rcache\+\_\+vma\+\_\+t}, \hyperlink{structompi__free__list__item__t}{ompi\+\_\+free\+\_\+list\+\_\+item\+\_\+t}, mca\+\_\+rcache\+\_\+vma\+\_\+construct, mca\+\_\+rcache\+\_\+vma\+\_\+destruct)}\label{rcache__vma__tree_8c_af078ab18be2129cbf1b9f6f5b214cb51}

\item 
static int \hyperlink{rcache__vma__tree_8c_a8137c466c17f217b88e6aa00c07ee943}{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+node\+\_\+compare} (void $\ast$key1, void $\ast$key2)
\begin{DoxyCompactList}\small\item\em \hyperlink{structFunction}{Function} for the red black tree to compare 2 keys. \end{DoxyCompactList}\item 
\hypertarget{rcache__vma__tree_8c_a073ef65300b66ae051e9567764e94969}{static int {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+node\+\_\+compare\+\_\+search} (void $\ast$key1, void $\ast$key2)}\label{rcache__vma__tree_8c_a073ef65300b66ae051e9567764e94969}

\item 
\hypertarget{rcache__vma__tree_8c_a8c02870839322f267421572647198a91}{static int {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+node\+\_\+compare\+\_\+closest} (void $\ast$key1, void $\ast$key2)}\label{rcache__vma__tree_8c_a8c02870839322f267421572647198a91}

\item 
\hypertarget{rcache__vma__tree_8c_a3fd1cebd133b12657e277c3953f4e079}{static \hyperlink{structmca__rcache__vma__t}{mca\+\_\+rcache\+\_\+vma\+\_\+t} $\ast$ {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+new} (\hyperlink{structmca__rcache__vma__module__t}{mca\+\_\+rcache\+\_\+vma\+\_\+module\+\_\+t} $\ast$vma\+\_\+rcache, uintptr\+\_\+t start, uintptr\+\_\+t end)}\label{rcache__vma__tree_8c_a3fd1cebd133b12657e277c3953f4e079}

\item 
\hypertarget{rcache__vma__tree_8c_ade1d3404cc381c5dbed983a69b423ba4}{void {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+destroy} (\hyperlink{structmca__rcache__vma__t}{mca\+\_\+rcache\+\_\+vma\+\_\+t} $\ast$vma)}\label{rcache__vma__tree_8c_ade1d3404cc381c5dbed983a69b423ba4}

\item 
\hypertarget{rcache__vma__tree_8c_a2b279b998e4ff642d8ccd334762acad3}{static int {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+compare\+\_\+regs} (\hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$reg1, \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$reg2)}\label{rcache__vma__tree_8c_a2b279b998e4ff642d8ccd334762acad3}

\item 
\hypertarget{rcache__vma__tree_8c_a33fe2a8feda7bcc32532e430d714a88e}{static int {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+add\+\_\+reg} (\hyperlink{structmca__rcache__vma__t}{mca\+\_\+rcache\+\_\+vma\+\_\+t} $\ast$vma, \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$reg)}\label{rcache__vma__tree_8c_a33fe2a8feda7bcc32532e430d714a88e}

\item 
\hypertarget{rcache__vma__tree_8c_a2cb0bd05aaeb98e5830c4dbc3eec0afb}{static void {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+remove\+\_\+reg} (\hyperlink{structmca__rcache__vma__t}{mca\+\_\+rcache\+\_\+vma\+\_\+t} $\ast$vma, \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$reg)}\label{rcache__vma__tree_8c_a2cb0bd05aaeb98e5830c4dbc3eec0afb}

\item 
\hypertarget{rcache__vma__tree_8c_a31451196bed52ff69bedf59f941fee63}{static int {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+copy\+\_\+reg\+\_\+list} (\hyperlink{structmca__rcache__vma__t}{mca\+\_\+rcache\+\_\+vma\+\_\+t} $\ast$to, \hyperlink{structmca__rcache__vma__t}{mca\+\_\+rcache\+\_\+vma\+\_\+t} $\ast$from)}\label{rcache__vma__tree_8c_a31451196bed52ff69bedf59f941fee63}

\item 
\hypertarget{rcache__vma__tree_8c_ac04a5c51b56352d3359514004bbcd1ea}{static int {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+compare\+\_\+reg\+\_\+lists} (\hyperlink{structmca__rcache__vma__t}{mca\+\_\+rcache\+\_\+vma\+\_\+t} $\ast$vma1, \hyperlink{structmca__rcache__vma__t}{mca\+\_\+rcache\+\_\+vma\+\_\+t} $\ast$vma2)}\label{rcache__vma__tree_8c_ac04a5c51b56352d3359514004bbcd1ea}

\item 
\hypertarget{rcache__vma__tree_8c_aedba0b11d830ea249863bd9501108b0a}{int {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+init} (\hyperlink{structmca__rcache__vma__module__t}{mca\+\_\+rcache\+\_\+vma\+\_\+module\+\_\+t} $\ast$rcache)}\label{rcache__vma__tree_8c_aedba0b11d830ea249863bd9501108b0a}

\item 
\hypertarget{rcache__vma__tree_8c_a09ff15e107214ecf91cbceae31bd8f39}{\hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$ \hyperlink{rcache__vma__tree_8c_a09ff15e107214ecf91cbceae31bd8f39}{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+find} (\hyperlink{structmca__rcache__vma__module__t}{mca\+\_\+rcache\+\_\+vma\+\_\+module\+\_\+t} $\ast$vma\+\_\+rcache, unsigned char $\ast$base, unsigned char $\ast$bound)}\label{rcache__vma__tree_8c_a09ff15e107214ecf91cbceae31bd8f39}

\begin{DoxyCompactList}\small\item\em Returns the item in the vma tree. \end{DoxyCompactList}\item 
\hypertarget{rcache__vma__tree_8c_a3b18603f18053c2cc842a8174c5b58ff}{static bool {\bfseries is\+\_\+reg\+\_\+in\+\_\+array} (\hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$$\ast$regs, int cnt, \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$p)}\label{rcache__vma__tree_8c_a3b18603f18053c2cc842a8174c5b58ff}

\item 
\hypertarget{rcache__vma__tree_8c_a17beaed2b1ff4e55d0d4657cd85115d6}{int \hyperlink{rcache__vma__tree_8c_a17beaed2b1ff4e55d0d4657cd85115d6}{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+find\+\_\+all} (\hyperlink{structmca__rcache__vma__module__t}{mca\+\_\+rcache\+\_\+vma\+\_\+module\+\_\+t} $\ast$vma\+\_\+rcache, unsigned char $\ast$base, unsigned char $\ast$bound, \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$$\ast$regs, int reg\+\_\+cnt)}\label{rcache__vma__tree_8c_a17beaed2b1ff4e55d0d4657cd85115d6}

\begin{DoxyCompactList}\small\item\em Returns all registration that overlaps given memory region. \end{DoxyCompactList}\item 
\hypertarget{rcache__vma__tree_8c_a50155821ca62ef9f002d19b75b019440}{static int {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+can\+\_\+insert} (\hyperlink{structmca__rcache__vma__module__t}{mca\+\_\+rcache\+\_\+vma\+\_\+module\+\_\+t} $\ast$vma\+\_\+rcache, size\+\_\+t nbytes, size\+\_\+t limit)}\label{rcache__vma__tree_8c_a50155821ca62ef9f002d19b75b019440}

\item 
\hypertarget{rcache__vma__tree_8c_a96da77ec54b15ef9e7c43e7f8f4a7ecc}{static void {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+update\+\_\+byte\+\_\+count} (\hyperlink{structmca__rcache__vma__module__t}{mca\+\_\+rcache\+\_\+vma\+\_\+module\+\_\+t} $\ast$vma\+\_\+rcache, size\+\_\+t nbytes)}\label{rcache__vma__tree_8c_a96da77ec54b15ef9e7c43e7f8f4a7ecc}

\item 
\hypertarget{rcache__vma__tree_8c_a0a0ec66651c4d6019da8661f67b1f692}{int {\bfseries mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+insert} (\hyperlink{structmca__rcache__vma__module__t}{mca\+\_\+rcache\+\_\+vma\+\_\+module\+\_\+t} $\ast$vma\+\_\+rcache, \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$reg, size\+\_\+t limit)}\label{rcache__vma__tree_8c_a0a0ec66651c4d6019da8661f67b1f692}

\item 
int \hyperlink{rcache__vma__tree_8c_af2acf80783cd6686568d82563246423b}{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete} (\hyperlink{structmca__rcache__vma__module__t}{mca\+\_\+rcache\+\_\+vma\+\_\+module\+\_\+t} $\ast$vma\+\_\+rcache, \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$reg)
\begin{DoxyCompactList}\small\item\em \hyperlink{structFunction}{Function} to remove previously memory from the tree without freeing it. \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-\/2007 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.

Copyright (c) 2006 Voltaire. All rights reserved. Copyright (c) 2007 Mellanox Technologies. All rights reserved. Copyright (c) 2009 I\+B\+M Corporation. All rights reserved.

\$\+C\+O\+P\+Y\+R\+I\+G\+H\+T\$

Additional copyrights may follow

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

Description of the Registration Cache framework 

\subsection{Function Documentation}
\hypertarget{rcache__vma__tree_8c_af2acf80783cd6686568d82563246423b}{\index{rcache\+\_\+vma\+\_\+tree.\+c@{rcache\+\_\+vma\+\_\+tree.\+c}!mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete@{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete}}
\index{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete@{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete}!rcache\+\_\+vma\+\_\+tree.\+c@{rcache\+\_\+vma\+\_\+tree.\+c}}
\subsubsection[{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete (
\begin{DoxyParamCaption}
\item[{{\bf mca\+\_\+rcache\+\_\+vma\+\_\+module\+\_\+t} $\ast$}]{vma\+\_\+rcache, }
\item[{{\bf mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$}]{reg}
\end{DoxyParamCaption}
)}}\label{rcache__vma__tree_8c_af2acf80783cd6686568d82563246423b}


\hyperlink{structFunction}{Function} to remove previously memory from the tree without freeing it. 


\begin{DoxyParams}{Parameters}
{\em base} & pointer to the memory to free\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S} & \\
\hline
{\em O\+M\+P\+I\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+P\+A\+R\+A\+M} & if the passed base pointer was invalid \\
\hline
\end{DoxyRetVals}


References mca\+\_\+rcache\+\_\+vma\+\_\+t\+::end, ompi\+\_\+rb\+\_\+tree\+\_\+delete(), ompi\+\_\+rb\+\_\+tree\+\_\+find\+\_\+with(), opal\+\_\+list\+\_\+append, opal\+\_\+list\+\_\+get\+\_\+begin(), opal\+\_\+list\+\_\+get\+\_\+end(), opal\+\_\+list\+\_\+get\+\_\+next, opal\+\_\+list\+\_\+get\+\_\+prev, opal\+\_\+list\+\_\+is\+\_\+empty(), opal\+\_\+list\+\_\+remove\+\_\+item(), mca\+\_\+rcache\+\_\+vma\+\_\+t\+::reg\+\_\+list, mca\+\_\+rcache\+\_\+vma\+\_\+t\+::start, mca\+\_\+rcache\+\_\+vma\+\_\+t\+::super, and opal\+\_\+list\+\_\+t\+::super.

\hypertarget{rcache__vma__tree_8c_a8137c466c17f217b88e6aa00c07ee943}{\index{rcache\+\_\+vma\+\_\+tree.\+c@{rcache\+\_\+vma\+\_\+tree.\+c}!mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+node\+\_\+compare@{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+node\+\_\+compare}}
\index{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+node\+\_\+compare@{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+node\+\_\+compare}!rcache\+\_\+vma\+\_\+tree.\+c@{rcache\+\_\+vma\+\_\+tree.\+c}}
\subsubsection[{mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+node\+\_\+compare}]{\setlength{\rightskip}{0pt plus 5cm}static int mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+node\+\_\+compare (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{key1, }
\item[{void $\ast$}]{key2}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{rcache__vma__tree_8c_a8137c466c17f217b88e6aa00c07ee943}


\hyperlink{structFunction}{Function} for the red black tree to compare 2 keys. 


\begin{DoxyParams}{Parameters}
{\em key1} & a pointer to the 1st key \\
\hline
{\em key2} & a pointer to the second key\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & if key1 is below key2 \\
\hline
{\em 1} & if key 1 is above key2 \\
\hline
{\em 0} & if the keys are the same \\
\hline
\end{DoxyRetVals}


References mca\+\_\+rcache\+\_\+vma\+\_\+t\+::start.

