| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.6"/> |
| <title>Impala: impala::MemPool Class Reference</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="resize.js"></script> |
| <script type="text/javascript" src="navtree.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(initResizable); |
| $(window).load(resizeHeight); |
| </script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/search.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(function() { searchBox.OnSelectItem(0); }); |
| </script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname">Impala |
| </div> |
| <div id="projectbrief">Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.6 --> |
| <script type="text/javascript"> |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| </script> |
| <div id="navrow1" class="tabs"> |
| <ul class="tablist"> |
| <li><a href="index.html"><span>Main Page</span></a></li> |
| <li><a href="namespaces.html"><span>Namespaces</span></a></li> |
| <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
| <li><a href="files.html"><span>Files</span></a></li> |
| <li> |
| <div id="MSearchBox" class="MSearchBoxInactive"> |
| <span class="left"> |
| <img id="MSearchSelect" src="search/mag_sel.png" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| alt=""/> |
| <input type="text" id="MSearchField" value="Search" accesskey="S" |
| onfocus="searchBox.OnSearchFieldFocus(true)" |
| onblur="searchBox.OnSearchFieldFocus(false)" |
| onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| </span><span class="right"> |
| <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| </span> |
| </div> |
| </li> |
| </ul> |
| </div> |
| <div id="navrow2" class="tabs2"> |
| <ul class="tablist"> |
| <li><a href="annotated.html"><span>Class List</span></a></li> |
| <li><a href="classes.html"><span>Class Index</span></a></li> |
| <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> |
| <li><a href="functions.html"><span>Class Members</span></a></li> |
| </ul> |
| </div> |
| </div><!-- top --> |
| <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| <div id="nav-tree"> |
| <div id="nav-tree-contents"> |
| <div id="nav-sync" class="sync"></div> |
| </div> |
| </div> |
| <div id="splitbar" style="-moz-user-select:none;" |
| class="ui-resizable-handle"> |
| </div> |
| </div> |
| <script type="text/javascript"> |
| $(document).ready(function(){initNavTree('classimpala_1_1MemPool.html','');}); |
| </script> |
| <div id="doc-content"> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a></div> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <iframe src="javascript:void(0)" frameborder="0" |
| name="MSearchResults" id="MSearchResults"> |
| </iframe> |
| </div> |
| |
| <div class="header"> |
| <div class="summary"> |
| <a href="#nested-classes">Classes</a> | |
| <a href="#pub-methods">Public Member Functions</a> | |
| <a href="#pub-static-attribs">Static Public Attributes</a> | |
| <a href="#pri-methods">Private Member Functions</a> | |
| <a href="#pri-attribs">Private Attributes</a> | |
| <a href="#pri-static-attribs">Static Private Attributes</a> | |
| <a href="#friends">Friends</a> | |
| <a href="classimpala_1_1MemPool-members.html">List of all members</a> </div> |
| <div class="headertitle"> |
| <div class="title">impala::MemPool Class Reference</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p><code>#include <<a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>></code></p> |
| <div class="dynheader"> |
| Collaboration diagram for impala::MemPool:</div> |
| <div class="dyncontent"> |
| <div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="classimpala_1_1MemPool__coll__graph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div> |
| </div> |
| <table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> |
| Classes</h2></td></tr> |
| <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structimpala_1_1MemPool_1_1ChunkInfo.html">ChunkInfo</a></td></tr> |
| <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| Public Member Functions</h2></td></tr> |
| <tr class="memitem:aa9ccc4e769921acd1d201f6c73004b37"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#aa9ccc4e769921acd1d201f6c73004b37">MemPool</a> (<a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> *<a class="el" href="classimpala_1_1MemPool.html#af1e294b306d89312142774a70a380d09">mem_tracker</a>, int chunk_size=0)</td></tr> |
| <tr class="separator:aa9ccc4e769921acd1d201f6c73004b37"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ad9c8621cb2eab208301174d9a8ba71cd"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#ad9c8621cb2eab208301174d9a8ba71cd">~MemPool</a> ()</td></tr> |
| <tr class="separator:ad9c8621cb2eab208301174d9a8ba71cd"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a190eb28e39279c901eda3d831a9fe726"><td class="memItemLeft" align="right" valign="top">uint8_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a190eb28e39279c901eda3d831a9fe726">Allocate</a> (int size)</td></tr> |
| <tr class="separator:a190eb28e39279c901eda3d831a9fe726"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a71349f04b4e473b23ee9827f294b2fa9"><td class="memItemLeft" align="right" valign="top">uint8_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a71349f04b4e473b23ee9827f294b2fa9">TryAllocate</a> (int size)</td></tr> |
| <tr class="separator:a71349f04b4e473b23ee9827f294b2fa9"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a59fedf9647cdeb3762f61a09bc3b1ce4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a59fedf9647cdeb3762f61a09bc3b1ce4">ReturnPartialAllocation</a> (int byte_size)</td></tr> |
| <tr class="separator:a59fedf9647cdeb3762f61a09bc3b1ce4"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a9f815c6b59422685b4b0e31d10bd54aa"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a9f815c6b59422685b4b0e31d10bd54aa">Clear</a> ()</td></tr> |
| <tr class="memdesc:a9f815c6b59422685b4b0e31d10bd54aa"><td class="mdescLeft"> </td><td class="mdescRight">Makes all allocated chunks available for re-use, but doesn't delete any chunks. <a href="#a9f815c6b59422685b4b0e31d10bd54aa">More...</a><br/></td></tr> |
| <tr class="separator:a9f815c6b59422685b4b0e31d10bd54aa"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:af7624a553a97ae17978357c000d4e38f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#af7624a553a97ae17978357c000d4e38f">FreeAll</a> ()</td></tr> |
| <tr class="separator:af7624a553a97ae17978357c000d4e38f"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ab6774a8c0694da25e200601506d26237"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#ab6774a8c0694da25e200601506d26237">AcquireData</a> (<a class="el" href="classimpala_1_1MemPool.html">MemPool</a> *src, <a class="el" href="classbool.html">bool</a> keep_current)</td></tr> |
| <tr class="separator:ab6774a8c0694da25e200601506d26237"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a82b2d42e792485a07550de82f1e92000"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a82b2d42e792485a07550de82f1e92000">Contains</a> (uint8_t *ptr, int size)</td></tr> |
| <tr class="separator:a82b2d42e792485a07550de82f1e92000"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:af9e3b198862ac0d6eb448f56ac23ce67"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#af9e3b198862ac0d6eb448f56ac23ce67">DebugString</a> ()</td></tr> |
| <tr class="separator:af9e3b198862ac0d6eb448f56ac23ce67"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a39eacea6272a7c49972f032845999e82"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a39eacea6272a7c49972f032845999e82">total_allocated_bytes</a> () const </td></tr> |
| <tr class="separator:a39eacea6272a7c49972f032845999e82"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a47305c5ea39d24729ca2f9700bb6f847"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a47305c5ea39d24729ca2f9700bb6f847">peak_allocated_bytes</a> () const </td></tr> |
| <tr class="separator:a47305c5ea39d24729ca2f9700bb6f847"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ab1c6885ad4b1fd9c29f290beeacc5d9e"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#ab1c6885ad4b1fd9c29f290beeacc5d9e">total_reserved_bytes</a> () const </td></tr> |
| <tr class="separator:ab1c6885ad4b1fd9c29f290beeacc5d9e"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:af1e294b306d89312142774a70a380d09"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#af1e294b306d89312142774a70a380d09">mem_tracker</a> ()</td></tr> |
| <tr class="separator:af1e294b306d89312142774a70a380d09"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a29d1dace7b744bdb69b38475aff98dd4"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a29d1dace7b744bdb69b38475aff98dd4">GetTotalChunkSizes</a> () const </td></tr> |
| <tr class="memdesc:a29d1dace7b744bdb69b38475aff98dd4"><td class="mdescLeft"> </td><td class="mdescRight">Return sum of chunk_sizes_. <a href="#a29d1dace7b744bdb69b38475aff98dd4">More...</a><br/></td></tr> |
| <tr class="separator:a29d1dace7b744bdb69b38475aff98dd4"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:afef3c760f0459be89250dc88a064bc2f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#afef3c760f0459be89250dc88a064bc2f">GetOffset</a> (uint8_t *data)</td></tr> |
| <tr class="separator:afef3c760f0459be89250dc88a064bc2f"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a4308eefcb222368950ef372a5e4da53b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a4308eefcb222368950ef372a5e4da53b">GetCurrentOffset</a> () const </td></tr> |
| <tr class="separator:a4308eefcb222368950ef372a5e4da53b"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ad7c1fcea6125b0af7af46962723b7242"><td class="memItemLeft" align="right" valign="top">uint8_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#ad7c1fcea6125b0af7af46962723b7242">GetDataPtr</a> (int <a class="el" href="partitioning-throughput-test_8cc.html#ad172ecfd5c31c5df6282c2b4bc322bf7">offset</a>)</td></tr> |
| <tr class="separator:ad7c1fcea6125b0af7af46962723b7242"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ae353862e599e20e6e1df4a1129ec5a1b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#ae353862e599e20e6e1df4a1129ec5a1b">GetChunkInfo</a> (std::vector< std::pair< uint8_t *, int > > *chunk_info)</td></tr> |
| <tr class="memdesc:ae353862e599e20e6e1df4a1129ec5a1b"><td class="mdescLeft"> </td><td class="mdescRight">Return (data ptr, allocated bytes) pairs for all chunks owned by this mempool. <a href="#ae353862e599e20e6e1df4a1129ec5a1b">More...</a><br/></td></tr> |
| <tr class="separator:ae353862e599e20e6e1df4a1129ec5a1b"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:aa2da3f8f8b7a55a10bab737de1efaf22"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#aa2da3f8f8b7a55a10bab737de1efaf22">DebugPrint</a> ()</td></tr> |
| <tr class="memdesc:aa2da3f8f8b7a55a10bab737de1efaf22"><td class="mdescLeft"> </td><td class="mdescRight">Print allocated bytes from all chunks. <a href="#aa2da3f8f8b7a55a10bab737de1efaf22">More...</a><br/></td></tr> |
| <tr class="separator:aa2da3f8f8b7a55a10bab737de1efaf22"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a> |
| Static Public Attributes</h2></td></tr> |
| <tr class="memitem:a24aa2a5c31a0b9c2140c4a86f1f221a9"><td class="memItemLeft" align="right" valign="top">static const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a24aa2a5c31a0b9c2140c4a86f1f221a9">LLVM_CLASS_NAME</a> = "class.impala::MemPool"</td></tr> |
| <tr class="separator:a24aa2a5c31a0b9c2140c4a86f1f221a9"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a> |
| Private Member Functions</h2></td></tr> |
| <tr class="memitem:af5ee39c7d48e2d6e0a487e63fd582450"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#af5ee39c7d48e2d6e0a487e63fd582450">FindChunk</a> (int min_size, <a class="el" href="classbool.html">bool</a> check_limits)</td></tr> |
| <tr class="separator:af5ee39c7d48e2d6e0a487e63fd582450"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a30898c912e6be0f382702290ddb86f5a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a30898c912e6be0f382702290ddb86f5a">CheckIntegrity</a> (<a class="el" href="classbool.html">bool</a> current_chunk_empty)</td></tr> |
| <tr class="separator:a30898c912e6be0f382702290ddb86f5a"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:abcfd4774633ee1b1e956a31d383cebf0"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#abcfd4774633ee1b1e956a31d383cebf0">GetOffsetHelper</a> (uint8_t *data)</td></tr> |
| <tr class="separator:abcfd4774633ee1b1e956a31d383cebf0"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:acee4f807f26984c93076f70b7da74e76"><td class="memItemLeft" align="right" valign="top">uint8_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#acee4f807f26984c93076f70b7da74e76">GetDataPtrHelper</a> (int <a class="el" href="partitioning-throughput-test_8cc.html#ad172ecfd5c31c5df6282c2b4bc322bf7">offset</a>)</td></tr> |
| <tr class="separator:acee4f807f26984c93076f70b7da74e76"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a4ff6357967059bea4163e39704bd8619"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a4ff6357967059bea4163e39704bd8619">GetFreeOffset</a> () const </td></tr> |
| <tr class="memdesc:a4ff6357967059bea4163e39704bd8619"><td class="mdescLeft"> </td><td class="mdescRight">Return offset to unoccpied space in current chunk. <a href="#a4ff6357967059bea4163e39704bd8619">More...</a><br/></td></tr> |
| <tr class="separator:a4ff6357967059bea4163e39704bd8619"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ab887cc4fb7ee6f2eac370a7ba871dc23"><td class="memTemplParams" colspan="2">template<bool CHECK_LIMIT_FIRST> </td></tr> |
| <tr class="memitem:ab887cc4fb7ee6f2eac370a7ba871dc23"><td class="memTemplItemLeft" align="right" valign="top">uint8_t * </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#ab887cc4fb7ee6f2eac370a7ba871dc23">Allocate</a> (int size)</td></tr> |
| <tr class="separator:ab887cc4fb7ee6f2eac370a7ba871dc23"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a> |
| Private Attributes</h2></td></tr> |
| <tr class="memitem:af0ff396c30a4323494d7cc037bbcb057"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#af0ff396c30a4323494d7cc037bbcb057">current_chunk_idx_</a></td></tr> |
| <tr class="separator:af0ff396c30a4323494d7cc037bbcb057"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a5224c101d19e3392d089efd34b24095b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a5224c101d19e3392d089efd34b24095b">last_offset_conversion_chunk_idx_</a></td></tr> |
| <tr class="separator:a5224c101d19e3392d089efd34b24095b"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a9d09eece6a96bbabcacc76fb97105aad"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a9d09eece6a96bbabcacc76fb97105aad">chunk_size_</a></td></tr> |
| <tr class="separator:a9d09eece6a96bbabcacc76fb97105aad"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a9b6bbe7604f4da8eedd9d2c766ea755a"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a9b6bbe7604f4da8eedd9d2c766ea755a">total_allocated_bytes_</a></td></tr> |
| <tr class="memdesc:a9b6bbe7604f4da8eedd9d2c766ea755a"><td class="mdescLeft"> </td><td class="mdescRight">sum of allocated_bytes_ <a href="#a9b6bbe7604f4da8eedd9d2c766ea755a">More...</a><br/></td></tr> |
| <tr class="separator:a9b6bbe7604f4da8eedd9d2c766ea755a"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a24d3194e8938e5bc8dfd6feda1e80bb1"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a24d3194e8938e5bc8dfd6feda1e80bb1">peak_allocated_bytes_</a></td></tr> |
| <tr class="memdesc:a24d3194e8938e5bc8dfd6feda1e80bb1"><td class="mdescLeft"> </td><td class="mdescRight">Maximum number of bytes allocated from this pool at one time. <a href="#a24d3194e8938e5bc8dfd6feda1e80bb1">More...</a><br/></td></tr> |
| <tr class="separator:a24d3194e8938e5bc8dfd6feda1e80bb1"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ad1bc506b722573a098e4148271b4a930"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#ad1bc506b722573a098e4148271b4a930">total_reserved_bytes_</a></td></tr> |
| <tr class="memdesc:ad1bc506b722573a098e4148271b4a930"><td class="mdescLeft"> </td><td class="mdescRight">sum of all bytes allocated in chunks_ <a href="#ad1bc506b722573a098e4148271b4a930">More...</a><br/></td></tr> |
| <tr class="separator:ad1bc506b722573a098e4148271b4a930"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a096c2b550b4ef7a1b377aa9203916eae"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="structimpala_1_1MemPool_1_1ChunkInfo.html">ChunkInfo</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a096c2b550b4ef7a1b377aa9203916eae">chunks_</a></td></tr> |
| <tr class="separator:a096c2b550b4ef7a1b377aa9203916eae"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a79e8c39843a3b620c32478b3ea0f0cb6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a79e8c39843a3b620c32478b3ea0f0cb6">mem_tracker_</a></td></tr> |
| <tr class="separator:a79e8c39843a3b620c32478b3ea0f0cb6"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-attribs"></a> |
| Static Private Attributes</h2></td></tr> |
| <tr class="memitem:a1daaba33da2e52fb0d70bd5000b25c1e"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a1daaba33da2e52fb0d70bd5000b25c1e">DEFAULT_INITIAL_CHUNK_SIZE</a> = 4 * 1024</td></tr> |
| <tr class="separator:a1daaba33da2e52fb0d70bd5000b25c1e"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a> |
| Friends</h2></td></tr> |
| <tr class="memitem:a322861f486366e94b973dd022ab523a8"><td class="memItemLeft" align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1MemPool.html#a322861f486366e94b973dd022ab523a8">MemPoolTest</a></td></tr> |
| <tr class="separator:a322861f486366e94b973dd022ab523a8"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <div class="textblock"><p>A <a class="el" href="classimpala_1_1MemPool.html">MemPool</a> maintains a list of memory chunks from which it allocates memory in response to <a class="el" href="classimpala_1_1MemPool.html#a190eb28e39279c901eda3d831a9fe726">Allocate()</a> calls; Chunks stay around for the lifetime of the mempool or until they are passed on to another mempool. The caller registers a <a class="el" href="classimpala_1_1MemTracker.html" title="This class is thread-safe. ">MemTracker</a> with the pool; chunk allocations are counted against that tracker and all of its ancestors. If chunks get moved between pools during <a class="el" href="classimpala_1_1MemPool.html#ab6774a8c0694da25e200601506d26237">AcquireData()</a> calls, the respective MemTrackers are updated accordingly. Chunks freed up in the d'tor are subtracted from the registered trackers. An <a class="el" href="classimpala_1_1MemPool.html#a190eb28e39279c901eda3d831a9fe726">Allocate()</a> call will attempt to allocate memory from the chunk that was most recently added; if that chunk doesn't have enough memory to satisfy the allocation request, the free chunks are searched for one that is big enough otherwise a new chunk is added to the list. The current_chunk_idx_ always points to the last chunk with allocated memory. In order to keep allocation overhead low, chunk sizes double with each new one added, until they hit a maximum size. Example: MemPool* p = new <a class="el" href="classimpala_1_1MemPool.html#aa9ccc4e769921acd1d201f6c73004b37">MemPool()</a>; for (int i = 0; i < 1024; ++i) { returns 8-byte aligned memory (effectively 24 bytes): .. = p->Allocate(17); } at this point, 17K have been handed out in response to <a class="el" href="classimpala_1_1MemPool.html#a190eb28e39279c901eda3d831a9fe726">Allocate()</a> calls and 28K of chunks have been allocated (chunk sizes: 4K, 8K, 16K) We track total and peak allocated bytes. At this point they would be the same: 28k bytes. A call to Clear will return the allocated memory so total_allocate_bytes_ becomes 0 while peak_allocate_bytes_ remains at 28k. p-><a class="el" href="classimpala_1_1MemPool.html#a9f815c6b59422685b4b0e31d10bd54aa" title="Makes all allocated chunks available for re-use, but doesn't delete any chunks. ">Clear()</a>; the entire 1st chunk is returned: .. = p->Allocate(4 * 1024); 4K of the 2nd chunk are returned: .. = p->Allocate(4 * 1024); a new 20K chunk is created .. = p->Allocate(20 * 1024); MemPool* p2 = new <a class="el" href="classimpala_1_1MemPool.html#aa9ccc4e769921acd1d201f6c73004b37">MemPool()</a>; the new mempool receives all chunks containing data from p p2->AcquireData(p, false); At this point p.total_allocated_bytes_ would be 0 while p.peak_allocated_bytes_ remains unchanged. The one remaining (empty) chunk is released: delete p; </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00077">77</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| <a class="anchor" id="aa9ccc4e769921acd1d201f6c73004b37"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">MemPool::MemPool </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> * </td> |
| <td class="paramname"><em>mem_tracker</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>chunk_size</em> = <code>0</code> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Allocates mempool with fixed-size chunks of size 'chunk_size'. Chunk_size must be >= 0; 0 requests automatic doubling of chunk sizes, up to a limit. 'tracker' tracks the amount of memory allocated by this pool. Must not be NULL. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00033">33</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00217">chunk_size_</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ad9c8621cb2eab208301174d9a8ba71cd"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">MemPool::~MemPool </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Frees all chunks of memory and subtracts the total allocated bytes from the registered limits. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00059">59</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, and <a class="el" href="impalad-metrics_8h_source.html#l00148">impala::ImpaladMetrics::MEM_POOL_TOTAL_BYTES</a>.</p> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Member Function Documentation</h2> |
| <a class="anchor" id="ab6774a8c0694da25e200601506d26237"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void MemPool::AcquireData </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="classimpala_1_1MemPool.html">MemPool</a> * </td> |
| <td class="paramname"><em>src</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"><a class="el" href="classbool.html">bool</a> </td> |
| <td class="paramname"><em>keep_current</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Absorb all chunks that hold data from src. If keep_current is true, let src hold on to its last allocated chunk that contains data. All offsets handed out by calls to <a class="el" href="classimpala_1_1MemPool.html#afef3c760f0459be89250dc88a064bc2f">GetOffset()</a>/GetCurrentOffset() for 'src' become invalid. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00161">161</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8cc_source.html#l00265">CheckIntegrity()</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-tracker_8h_source.html#l00118">impala::MemTracker::Consume()</a>, <a class="el" href="mem-pool_8h_source.html#l00211">current_chunk_idx_</a>, <a class="el" href="mem-pool_8cc_source.html#l00073">FreeAll()</a>, <a class="el" href="mem-pool_8h_source.html#l00250">GetFreeOffset()</a>, <a class="el" href="mem-pool_8h_source.html#l00232">mem_tracker_</a>, <a class="el" href="mem-pool_8h_source.html#l00223">peak_allocated_bytes_</a>, <a class="el" href="mem-tracker_8h_source.html#l00209">impala::MemTracker::Release()</a>, <a class="el" href="mem-pool_8h_source.html#l00220">total_allocated_bytes_</a>, and <a class="el" href="mem-pool_8h_source.html#l00226">total_reserved_bytes_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="hdfs-scanner_8h_source.html#l00256">impala::HdfsScanner::AttachPool()</a>, <a class="el" href="codec_8cc_source.html#l00174">impala::Codec::Close()</a>, <a class="el" href="hbase-scan-node_8cc_source.html#l00147">impala::HBaseScanNode::GetNext()</a>, <a class="el" href="analytic-eval-node_8cc_source.html#l00696">impala::AnalyticEvalNode::GetNext()</a>, <a class="el" href="decompress_8cc_source.html#l00118">impala::GzipDecompressor::ProcessBlock()</a>, <a class="el" href="decompress_8cc_source.html#l00217">impala::BzipDecompressor::ProcessBlock()</a>, <a class="el" href="compress_8cc_source.html#l00140">impala::BzipCompressor::ProcessBlock()</a>, <a class="el" href="scanner-context_8cc_source.html#l00076">impala::ScannerContext::Stream::ReleaseCompletedResources()</a>, and <a class="el" href="mem-pool-test_8cc_source.html#l00025">impala::TEST()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a190eb28e39279c901eda3d831a9fe726"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">uint8_t* impala::MemPool::Allocate </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>size</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Allocates 8-byte aligned section of memory of 'size' bytes at the end of the the current chunk. Creates a new chunk if there aren't any chunks with enough capacity. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00092">92</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="free-pool_8h_source.html#l00054">impala::FreePool::Allocate()</a>, <a class="el" href="decompress-test_8cc_source.html#l00102">impala::DecompressorTest::CompressAndDecompress()</a>, <a class="el" href="decompress-test_8cc_source.html#l00170">impala::DecompressorTest::CompressAndDecompressNoOutputAllocated()</a>, <a class="el" href="hdfs-parquet-scanner_8cc_source.html#l00382">impala::HdfsParquetScanner::ColumnReader< T >::ConvertSlot()</a>, <a class="el" href="hdfs-text-scanner_8cc_source.html#l00757">impala::HdfsTextScanner::CopyBoundaryField()</a>, <a class="el" href="hdfs-parquet-scanner_8cc_source.html#l00373">impala::HdfsParquetScanner::ColumnReader< T >::CopySlot()</a>, <a class="el" href="tuple_8h_source.html#l00051">impala::Tuple::Create()</a>, <a class="el" href="buffered-tuple-stream-test_8cc_source.html#l00101">impala::SimpleTupleStreamTest::CreateIntBatch()</a>, <a class="el" href="row-batch-list-test_8cc_source.html#l00054">impala::RowBatchListTest::CreateRowBatch()</a>, <a class="el" href="data-stream-test_8cc_source.html#l00292">impala::DataStreamTest::CreateRowBatch()</a>, <a class="el" href="buffered-tuple-stream-test_8cc_source.html#l00136">impala::SimpleTupleStreamTest::CreateStringBatch()</a>, <a class="el" href="old-hash-table-test_8cc_source.html#l00076">impala::OldHashTableTest::CreateTupleRow()</a>, <a class="el" href="hash-table-test_8cc_source.html#l00076">impala::HashTableTest::CreateTupleRow()</a>, <a class="el" href="tuple-row_8h_source.html#l00039">impala::TupleRow::DeepCopy()</a>, <a class="el" href="tuple_8cc_source.html#l00034">impala::Tuple::DeepCopy()</a>, <a class="el" href="data-source-scan-node_8cc_source.html#l00292">impala::DataSourceScanNode::GetNext()</a>, <a class="el" href="string-buffer_8h_source.html#l00098">impala::StringBuffer::GrowBuffer()</a>, <a class="el" href="hash-table_8cc_source.html#l00345">impala::HashTable::GrowNodeArray()</a>, <a class="el" href="data-source-scan-node_8cc_source.html#l00193">impala::DataSourceScanNode::MaterializeNextRow()</a>, <a class="el" href="compress_8cc_source.html#l00110">impala::GzipCompressor::ProcessBlock()</a>, <a class="el" href="decompress_8cc_source.html#l00416">impala::SnappyDecompressor::ProcessBlock()</a>, <a class="el" href="compress_8cc_source.html#l00197">impala::SnappyBlockCompressor::ProcessBlock()</a>, <a class="el" href="compress_8cc_source.html#l00249">impala::SnappyCompressor::ProcessBlock()</a>, <a class="el" href="decompress_8cc_source.html#l00375">impala::SnappyBlockDecompressor::ProcessBlock()</a>, <a class="el" href="decompress_8cc_source.html#l00071">impala::GzipDecompressor::ProcessBlockStreaming()</a>, <a class="el" href="data-provider_8cc_source.html#l00043">RandString()</a>, <a class="el" href="hdfs-avro-scanner-ir_8cc_source.html#l00131">impala::HdfsAvroScanner::ReadAvroChar()</a>, <a class="el" href="hdfs-scanner_8cc_source.html#l00108">impala::HdfsScanner::StartNewRowBatch()</a>, <a class="el" href="mem-pool-test_8cc_source.html#l00025">impala::TEST()</a>, <a class="el" href="text-converter_8cc_source.html#l00039">impala::TextConverter::UnescapeString()</a>, <a class="el" href="raw-value_8cc_source.html#l00189">impala::RawValue::Write()</a>, and <a class="el" href="text-converter_8inline_8h_source.html#l00037">impala::TextConverter::WriteSlot()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ab887cc4fb7ee6f2eac370a7ba871dc23"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<bool CHECK_LIMIT_FIRST> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">uint8_t* impala::MemPool::Allocate </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>size</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00256">256</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00194">impala::MemPool::ChunkInfo::allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-pool_8h_source.html#l00211">current_chunk_idx_</a>, <a class="el" href="mem-pool_8h_source.html#l00185">impala::MemPool::ChunkInfo::data</a>, <a class="el" href="mem-pool_8cc_source.html#l00092">FindChunk()</a>, <a class="el" href="mem-pool_8h_source.html#l00184">impala::MemPool::ChunkInfo::owns_data</a>, <a class="el" href="mem-pool_8h_source.html#l00223">peak_allocated_bytes_</a>, <a class="el" href="mem-pool_8h_source.html#l00186">impala::MemPool::ChunkInfo::size</a>, and <a class="el" href="mem-pool_8h_source.html#l00220">total_allocated_bytes_</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a30898c912e6be0f382702290ddb86f5a"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classbool.html">bool</a> MemPool::CheckIntegrity </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="classbool.html">bool</a> </td> |
| <td class="paramname"><em>current_chunk_empty</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Check integrity of the supporting data structures; always returns true but DCHECKs all invariants. If 'current_chunk_empty' is false, checks that the current chunk contains data. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00265">265</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00217">chunk_size_</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-pool_8h_source.html#l00211">current_chunk_idx_</a>, and <a class="el" href="mem-pool_8h_source.html#l00220">total_allocated_bytes_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00161">AcquireData()</a>, <a class="el" href="mem-pool-test_8cc_source.html#l00214">impala::MemPoolTest::CheckIntegrity()</a>, <a class="el" href="mem-pool_8h_source.html#l00118">Clear()</a>, and <a class="el" href="mem-pool_8cc_source.html#l00092">FindChunk()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a9f815c6b59422685b4b0e31d10bd54aa"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void impala::MemPool::Clear </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Makes all allocated chunks available for re-use, but doesn't delete any chunks. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00118">118</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8cc_source.html#l00265">CheckIntegrity()</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-pool_8h_source.html#l00211">current_chunk_idx_</a>, and <a class="el" href="mem-pool_8h_source.html#l00220">total_allocated_bytes_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool-test_8cc_source.html#l00025">impala::TEST()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a82b2d42e792485a07550de82f1e92000"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classbool.html">bool</a> MemPool::Contains </td> |
| <td>(</td> |
| <td class="paramtype">uint8_t * </td> |
| <td class="paramname"><em>ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>size</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Diagnostic to check if memory is allocated from this mempool. Inputs: ptr: start of memory block. size: size of memory block. Returns true if memory block is in one of the chunks in this mempool. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00223">223</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00194">impala::MemPool::ChunkInfo::allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, and <a class="el" href="mem-pool_8h_source.html#l00185">impala::MemPool::ChunkInfo::data</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="aa2da3f8f8b7a55a10bab737de1efaf22"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">string MemPool::DebugPrint </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Print allocated bytes from all chunks. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00332">332</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00194">impala::MemPool::ChunkInfo::allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, and <a class="el" href="mem-pool_8h_source.html#l00185">impala::MemPool::ChunkInfo::data</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="af9e3b198862ac0d6eb448f56ac23ce67"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">string MemPool::DebugString </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00238">238</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-pool_8h_source.html#l00211">current_chunk_idx_</a>, <a class="el" href="mem-pool_8cc_source.html#l00257">GetTotalChunkSizes()</a>, and <a class="el" href="mem-pool_8h_source.html#l00220">total_allocated_bytes_</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="af5ee39c7d48e2d6e0a487e63fd582450"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classbool.html">bool</a> MemPool::FindChunk </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>min_size</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"><a class="el" href="classbool.html">bool</a> </td> |
| <td class="paramname"><em>check_limits</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Find or allocated a chunk with at least min_size spare capacity and update current_chunk_idx_. Also updates chunks_, chunk_sizes_ and allocated_bytes_ if a new chunk needs to be created. If check_limits is true, this call can fail (returns false) if adding a new chunk exceeds the mem limits. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00092">92</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00194">impala::MemPool::ChunkInfo::allocated_bytes</a>, <a class="el" href="mem-pool_8cc_source.html#l00265">CheckIntegrity()</a>, <a class="el" href="mem-pool_8h_source.html#l00217">chunk_size_</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-tracker_8h_source.html#l00118">impala::MemTracker::Consume()</a>, <a class="el" href="mem-pool_8h_source.html#l00191">impala::MemPool::ChunkInfo::cumulative_allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00211">current_chunk_idx_</a>, <a class="el" href="mem-pool_8h_source.html#l00181">DEFAULT_INITIAL_CHUNK_SIZE</a>, <a class="el" href="mem-pool_8h_source.html#l00232">mem_tracker_</a>, <a class="el" href="mem-pool_8h_source.html#l00226">total_reserved_bytes_</a>, and <a class="el" href="mem-tracker_8h_source.html#l00163">impala::MemTracker::TryConsume()</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8h_source.html#l00256">Allocate()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="af7624a553a97ae17978357c000d4e38f"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void MemPool::FreeAll </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Deletes all allocated chunks. <a class="el" href="classimpala_1_1MemPool.html#af7624a553a97ae17978357c000d4e38f">FreeAll()</a> or <a class="el" href="classimpala_1_1MemPool.html#ab6774a8c0694da25e200601506d26237">AcquireData()</a> must be called for each mem pool </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00073">73</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-pool_8h_source.html#l00211">current_chunk_idx_</a>, <a class="el" href="mem-pool_8h_source.html#l00215">last_offset_conversion_chunk_idx_</a>, <a class="el" href="impalad-metrics_8h_source.html#l00148">impala::ImpaladMetrics::MEM_POOL_TOTAL_BYTES</a>, <a class="el" href="mem-pool_8h_source.html#l00232">mem_tracker_</a>, <a class="el" href="mem-tracker_8h_source.html#l00209">impala::MemTracker::Release()</a>, <a class="el" href="mem-pool_8h_source.html#l00220">total_allocated_bytes_</a>, and <a class="el" href="mem-pool_8h_source.html#l00226">total_reserved_bytes_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00161">AcquireData()</a>, <a class="el" href="hash-table-test_8cc_source.html#l00190">impala::HashTableTest::BasicTest()</a>, <a class="el" href="hash-table-test_8cc_source.html#l00298">impala::HashTableTest::GrowTableTest()</a>, <a class="el" href="hash-table-test_8cc_source.html#l00352">impala::HashTableTest::InsertFullTest()</a>, <a class="el" href="hash-table-test_8cc_source.html#l00247">impala::HashTableTest::ScanTest()</a>, <a class="el" href="hash-table-test_8cc_source.html#l00161">impala::HashTableTest::SetupTest()</a>, <a class="el" href="free-pool-test_8cc_source.html#l00026">impala::TEST()</a>, <a class="el" href="decompress-test_8cc_source.html#l00234">impala::TEST_F()</a>, <a class="el" href="dict-test_8cc_source.html#l00033">impala::ValidateDict()</a>, and <a class="el" href="decompress-test_8cc_source.html#l00051">impala::DecompressorTest::~DecompressorTest()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ae353862e599e20e6e1df4a1129ec5a1b"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void MemPool::GetChunkInfo </td> |
| <td>(</td> |
| <td class="paramtype">std::vector< std::pair< uint8_t *, int > > * </td> |
| <td class="paramname"><em>chunk_info</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Return (data ptr, allocated bytes) pairs for all chunks owned by this mempool. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00325">325</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a4308eefcb222368950ef372a5e4da53b"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int impala::MemPool::GetCurrentOffset </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td> const</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Return logical offset of memory returned by next call to <a class="el" href="classimpala_1_1MemPool.html#a190eb28e39279c901eda3d831a9fe726">Allocate()</a> into allocated data. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00163">163</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00220">total_allocated_bytes_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="tuple_8cc_source.html#l00040">impala::Tuple::DeepCopy()</a>, and <a class="el" href="mem-pool-test_8cc_source.html#l00115">impala::TEST()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ad7c1fcea6125b0af7af46962723b7242"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">uint8_t * impala::MemPool::GetDataPtr </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>offset</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Given a logical offset into the allocated data (allowed values: 0 - <a class="el" href="classimpala_1_1MemPool.html#a39eacea6272a7c49972f032845999e82">total_allocated_bytes()</a> - 1), return a pointer to that offset. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00294">294</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00194">impala::MemPool::ChunkInfo::allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-pool_8h_source.html#l00191">impala::MemPool::ChunkInfo::cumulative_allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00185">impala::MemPool::ChunkInfo::data</a>, <a class="el" href="mem-pool_8cc_source.html#l00311">GetDataPtrHelper()</a>, and <a class="el" href="mem-pool_8h_source.html#l00215">last_offset_conversion_chunk_idx_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool-test_8cc_source.html#l00115">impala::TEST()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="acee4f807f26984c93076f70b7da74e76"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">uint8_t * MemPool::GetDataPtrHelper </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>offset</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00311">311</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00194">impala::MemPool::ChunkInfo::allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-pool_8h_source.html#l00191">impala::MemPool::ChunkInfo::cumulative_allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00185">impala::MemPool::ChunkInfo::data</a>, <a class="el" href="gen__ir__descriptions_8py_source.html#l00215">gen_ir_descriptions::idx</a>, <a class="el" href="mem-pool_8h_source.html#l00215">last_offset_conversion_chunk_idx_</a>, and <a class="el" href="mem-pool_8h_source.html#l00220">total_allocated_bytes_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8h_source.html#l00294">GetDataPtr()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a4ff6357967059bea4163e39704bd8619"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int impala::MemPool::GetFreeOffset </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td> const</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Return offset to unoccpied space in current chunk. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00250">250</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, and <a class="el" href="mem-pool_8h_source.html#l00211">current_chunk_idx_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00161">AcquireData()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="afef3c760f0459be89250dc88a064bc2f"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int impala::MemPool::GetOffset </td> |
| <td>(</td> |
| <td class="paramtype">uint8_t * </td> |
| <td class="paramname"><em>data</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Return logical offset of data ptr into allocated data (interval [0, <a class="el" href="classimpala_1_1MemPool.html#a39eacea6272a7c49972f032845999e82">total_allocated_bytes()</a>) ). Returns -1 if 'data' doesn't belong to this mempool. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00283">283</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00194">impala::MemPool::ChunkInfo::allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-pool_8h_source.html#l00191">impala::MemPool::ChunkInfo::cumulative_allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00185">impala::MemPool::ChunkInfo::data</a>, <a class="el" href="mem-pool_8cc_source.html#l00296">GetOffsetHelper()</a>, and <a class="el" href="mem-pool_8h_source.html#l00215">last_offset_conversion_chunk_idx_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool-test_8cc_source.html#l00115">impala::TEST()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="abcfd4774633ee1b1e956a31d383cebf0"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int MemPool::GetOffsetHelper </td> |
| <td>(</td> |
| <td class="paramtype">uint8_t * </td> |
| <td class="paramname"><em>data</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00296">296</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00194">impala::MemPool::ChunkInfo::allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-pool_8h_source.html#l00191">impala::MemPool::ChunkInfo::cumulative_allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00185">impala::MemPool::ChunkInfo::data</a>, <a class="el" href="gen__ir__descriptions_8py_source.html#l00215">gen_ir_descriptions::idx</a>, and <a class="el" href="mem-pool_8h_source.html#l00215">last_offset_conversion_chunk_idx_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8h_source.html#l00283">GetOffset()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a29d1dace7b744bdb69b38475aff98dd4"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int64_t MemPool::GetTotalChunkSizes </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td> const</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Return sum of chunk_sizes_. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8cc_source.html#l00257">257</a> of file <a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00238">DebugString()</a>, and <a class="el" href="mem-pool-test_8cc_source.html#l00025">impala::TEST()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="af1e294b306d89312142774a70a380d09"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a>* impala::MemPool::mem_tracker </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00151">151</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00232">mem_tracker_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="codec_8cc_source.html#l00164">impala::Codec::Codec()</a>, <a class="el" href="hash-table_8cc_source.html#l00345">impala::HashTable::GrowNodeArray()</a>, <a class="el" href="free-pool_8h_source.html#l00127">impala::FreePool::mem_tracker()</a>, and <a class="el" href="agg-fn-evaluator_8cc_source.html#l00124">impala::AggFnEvaluator::Prepare()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a47305c5ea39d24729ca2f9700bb6f847"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int64_t impala::MemPool::peak_allocated_bytes </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td> const</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00149">149</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00223">peak_allocated_bytes_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool-test_8cc_source.html#l00025">impala::TEST()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a59fedf9647cdeb3762f61a09bc3b1ce4"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void impala::MemPool::ReturnPartialAllocation </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>byte_size</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Returns 'byte_size' to the current chunk back to the mem pool. This can only be used to return either all or part of the previous allocation returned by <a class="el" href="classimpala_1_1MemPool.html#a190eb28e39279c901eda3d831a9fe726">Allocate()</a>. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00107">107</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00194">impala::MemPool::ChunkInfo::allocated_bytes</a>, <a class="el" href="mem-pool_8h_source.html#l00228">chunks_</a>, <a class="el" href="mem-pool_8h_source.html#l00211">current_chunk_idx_</a>, <a class="el" href="mem-pool_8h_source.html#l00184">impala::MemPool::ChunkInfo::owns_data</a>, and <a class="el" href="mem-pool_8h_source.html#l00220">total_allocated_bytes_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool-test_8cc_source.html#l00174">impala::TEST()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a39eacea6272a7c49972f032845999e82"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int64_t impala::MemPool::total_allocated_bytes </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td> const</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00148">148</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00220">total_allocated_bytes_</a>.</p> |
| |
| <p>Referenced by <a class="el" href="row-batch_8h_source.html#l00129">impala::RowBatch::AtCapacity()</a>, and <a class="el" href="free-pool-test_8cc_source.html#l00026">impala::TEST()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ab1c6885ad4b1fd9c29f290beeacc5d9e"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int64_t impala::MemPool::total_reserved_bytes </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td> const</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00150">150</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>References <a class="el" href="mem-pool_8h_source.html#l00226">total_reserved_bytes_</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a71349f04b4e473b23ee9827f294b2fa9"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">uint8_t* impala::MemPool::TryAllocate </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>size</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Same as <a class="el" href="classimpala_1_1MemPool.html#a190eb28e39279c901eda3d831a9fe726">Allocate()</a> except the mem limit is checked before the allocation and this call will fail (returns NULL) if it does. The caller must handle the NULL case. This should be used for allocations where the size can be very big to bound the amount by which we exceed mem limits. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00100">100</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Friends And Related Function Documentation</h2> |
| <a class="anchor" id="a322861f486366e94b973dd022ab523a8"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">friend class <a class="el" href="classimpala_1_1MemPoolTest.html">MemPoolTest</a></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">friend</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00180">180</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Member Data Documentation</h2> |
| <a class="anchor" id="a9d09eece6a96bbabcacc76fb97105aad"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int impala::MemPool::chunk_size_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00217">217</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00265">CheckIntegrity()</a>, <a class="el" href="mem-pool_8cc_source.html#l00092">FindChunk()</a>, and <a class="el" href="mem-pool_8cc_source.html#l00033">MemPool()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a096c2b550b4ef7a1b377aa9203916eae"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">std::vector<<a class="el" href="structimpala_1_1MemPool_1_1ChunkInfo.html">ChunkInfo</a>> impala::MemPool::chunks_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00228">228</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00161">AcquireData()</a>, <a class="el" href="mem-pool_8h_source.html#l00256">Allocate()</a>, <a class="el" href="mem-pool_8cc_source.html#l00265">CheckIntegrity()</a>, <a class="el" href="mem-pool_8h_source.html#l00118">Clear()</a>, <a class="el" href="mem-pool_8cc_source.html#l00223">Contains()</a>, <a class="el" href="mem-pool_8cc_source.html#l00332">DebugPrint()</a>, <a class="el" href="mem-pool_8cc_source.html#l00238">DebugString()</a>, <a class="el" href="mem-pool_8cc_source.html#l00092">FindChunk()</a>, <a class="el" href="mem-pool_8cc_source.html#l00073">FreeAll()</a>, <a class="el" href="mem-pool_8cc_source.html#l00325">GetChunkInfo()</a>, <a class="el" href="mem-pool_8h_source.html#l00294">GetDataPtr()</a>, <a class="el" href="mem-pool_8cc_source.html#l00311">GetDataPtrHelper()</a>, <a class="el" href="mem-pool_8h_source.html#l00250">GetFreeOffset()</a>, <a class="el" href="mem-pool_8h_source.html#l00283">GetOffset()</a>, <a class="el" href="mem-pool_8cc_source.html#l00296">GetOffsetHelper()</a>, <a class="el" href="mem-pool_8cc_source.html#l00257">GetTotalChunkSizes()</a>, <a class="el" href="mem-pool_8h_source.html#l00107">ReturnPartialAllocation()</a>, and <a class="el" href="mem-pool_8cc_source.html#l00059">~MemPool()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="af0ff396c30a4323494d7cc037bbcb057"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int impala::MemPool::current_chunk_idx_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>chunk from which we served the last <a class="el" href="classimpala_1_1MemPool.html#a190eb28e39279c901eda3d831a9fe726">Allocate()</a> call; always points to the last chunk that contains allocated data; chunks 0..current_chunk_idx_ are guaranteed to contain data (chunks_[i].allocated_bytes > 0 for i: 0..current_chunk_idx_); -1 if no chunks present </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00211">211</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00161">AcquireData()</a>, <a class="el" href="mem-pool_8h_source.html#l00256">Allocate()</a>, <a class="el" href="mem-pool_8cc_source.html#l00265">CheckIntegrity()</a>, <a class="el" href="mem-pool_8h_source.html#l00118">Clear()</a>, <a class="el" href="mem-pool_8cc_source.html#l00238">DebugString()</a>, <a class="el" href="mem-pool_8cc_source.html#l00092">FindChunk()</a>, <a class="el" href="mem-pool_8cc_source.html#l00073">FreeAll()</a>, <a class="el" href="mem-pool_8h_source.html#l00250">GetFreeOffset()</a>, and <a class="el" href="mem-pool_8h_source.html#l00107">ReturnPartialAllocation()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a1daaba33da2e52fb0d70bd5000b25c1e"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">const int MemPool::DEFAULT_INITIAL_CHUNK_SIZE = 4 * 1024</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00181">181</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00092">FindChunk()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a5224c101d19e3392d089efd34b24095b"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int impala::MemPool::last_offset_conversion_chunk_idx_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>chunk where last offset conversion (<a class="el" href="classimpala_1_1MemPool.html#afef3c760f0459be89250dc88a064bc2f">GetOffset()</a> or <a class="el" href="classimpala_1_1MemPool.html#ad7c1fcea6125b0af7af46962723b7242">GetDataPtr()</a>) took place; -1 if those functions have never been called </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00215">215</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00073">FreeAll()</a>, <a class="el" href="mem-pool_8h_source.html#l00294">GetDataPtr()</a>, <a class="el" href="mem-pool_8cc_source.html#l00311">GetDataPtrHelper()</a>, <a class="el" href="mem-pool_8h_source.html#l00283">GetOffset()</a>, and <a class="el" href="mem-pool_8cc_source.html#l00296">GetOffsetHelper()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a24aa2a5c31a0b9c2140c4a86f1f221a9"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">const char * MemPool::LLVM_CLASS_NAME = "class.impala::MemPool"</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>TODO: make a macro for doing this For C++/IR interop, we need to be able to look up types by name. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00177">177</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="hdfs-avro-scanner_8cc_source.html#l00691">impala::HdfsAvroScanner::CodegenMaterializeTuple()</a>, and <a class="el" href="hdfs-scanner_8cc_source.html#l00296">impala::HdfsScanner::CodegenWriteCompleteTuple()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a79e8c39843a3b620c32478b3ea0f0cb6"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a>* impala::MemPool::mem_tracker_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>The current and peak memory footprint of this pool. This is different from total allocated_bytes_ since it includes bytes in chunks that are not used. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00232">232</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00161">AcquireData()</a>, <a class="el" href="mem-pool_8cc_source.html#l00092">FindChunk()</a>, <a class="el" href="mem-pool_8cc_source.html#l00073">FreeAll()</a>, and <a class="el" href="mem-pool_8h_source.html#l00151">mem_tracker()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a24d3194e8938e5bc8dfd6feda1e80bb1"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int64_t impala::MemPool::peak_allocated_bytes_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Maximum number of bytes allocated from this pool at one time. </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00223">223</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00161">AcquireData()</a>, <a class="el" href="mem-pool_8h_source.html#l00256">Allocate()</a>, and <a class="el" href="mem-pool_8h_source.html#l00149">peak_allocated_bytes()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a9b6bbe7604f4da8eedd9d2c766ea755a"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int64_t impala::MemPool::total_allocated_bytes_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>sum of allocated_bytes_ </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00220">220</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00161">AcquireData()</a>, <a class="el" href="mem-pool_8h_source.html#l00256">Allocate()</a>, <a class="el" href="mem-pool_8cc_source.html#l00265">CheckIntegrity()</a>, <a class="el" href="mem-pool_8h_source.html#l00118">Clear()</a>, <a class="el" href="mem-pool_8cc_source.html#l00238">DebugString()</a>, <a class="el" href="mem-pool_8cc_source.html#l00073">FreeAll()</a>, <a class="el" href="mem-pool_8h_source.html#l00163">GetCurrentOffset()</a>, <a class="el" href="mem-pool_8cc_source.html#l00311">GetDataPtrHelper()</a>, <a class="el" href="mem-pool_8h_source.html#l00107">ReturnPartialAllocation()</a>, and <a class="el" href="mem-pool_8h_source.html#l00148">total_allocated_bytes()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ad1bc506b722573a098e4148271b4a930"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int64_t impala::MemPool::total_reserved_bytes_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>sum of all bytes allocated in chunks_ </p> |
| |
| <p>Definition at line <a class="el" href="mem-pool_8h_source.html#l00226">226</a> of file <a class="el" href="mem-pool_8h_source.html">mem-pool.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="mem-pool_8cc_source.html#l00161">AcquireData()</a>, <a class="el" href="mem-pool_8cc_source.html#l00092">FindChunk()</a>, <a class="el" href="mem-pool_8cc_source.html#l00073">FreeAll()</a>, and <a class="el" href="mem-pool_8h_source.html#l00150">total_reserved_bytes()</a>.</p> |
| |
| </div> |
| </div> |
| <hr/>The documentation for this class was generated from the following files:<ul> |
| <li>be/src/runtime/<a class="el" href="mem-pool_8h_source.html">mem-pool.h</a></li> |
| <li>be/src/runtime/<a class="el" href="mem-pool_8cc_source.html">mem-pool.cc</a></li> |
| </ul> |
| </div><!-- contents --> |
| </div><!-- doc-content --> |
| <!-- start footer part --> |
| <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| <ul> |
| <li class="navelem"><a class="el" href="namespaceimpala.html">impala</a></li><li class="navelem"><a class="el" href="classimpala_1_1MemPool.html">MemPool</a></li> |
| <li class="footer">Generated on Thu May 7 2015 16:10:49 for Impala by |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li> |
| </ul> |
| </div> |
| </body> |
| </html> |