You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

382 lines
20 KiB

<!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.4"/>
<title>Memory Allocation</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="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Memory Allocation</div> </div>
</div><!--header-->
<div class="contents">
<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">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html">tbb::aligned_space&lt; T, N &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Block of space aligned sufficiently to construct an array T with N elements. <a href="a00014.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html">tbb::cache_aligned_allocator&lt; T &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. <a href="a00029.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html">tbb::cache_aligned_allocator&lt; void &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Analogous to std::allocator&lt;void&gt;, as defined in ISO C++ Standard, Section 20.4.1. <a href="a00030.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00074.html">tbb::interface6::memory_pool_allocator&lt; T, P &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. <a href="a00074.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00075.html">tbb::interface6::memory_pool_allocator&lt; void, P &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Analogous to std::allocator&lt;void&gt;, as defined in ISO C++ Standard, Section 20.4.1. <a href="a00075.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html">tbb::scalable_allocator&lt; T &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. <a href="a00111.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00112.html">tbb::scalable_allocator&lt; void &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Analogous to std::allocator&lt;void&gt;, as defined in ISO C++ Standard, Section 20.4.1. <a href="a00112.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.html">tbb::tbb_allocator&lt; T &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. <a href="a00144.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html">tbb::tbb_allocator&lt; void &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Analogous to std::allocator&lt;void&gt;, as defined in ISO C++ Standard, Section 20.4.1. <a href="a00145.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html">tbb::zero_allocator&lt; T, Allocator &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. <a href="a00160.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html">tbb::zero_allocator&lt; void, Allocator &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Analogous to std::allocator&lt;void&gt;, as defined in ISO C++ Standard, Section 20.4.1. <a href="a00161.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2a5bdc71439a70b20f2eadf6e1a489e1"><td class="memItemLeft" align="right" valign="top">void *__TBB_EXPORTED_FUNC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga2a5bdc71439a70b20f2eadf6e1a489e1">scalable_malloc</a> (size_t size)</td></tr>
<tr class="separator:ga2a5bdc71439a70b20f2eadf6e1a489e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2ad3952b8c4dd7d293e02ae18fc37b84"><td class="memItemLeft" align="right" valign="top">void __TBB_EXPORTED_FUNC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga2ad3952b8c4dd7d293e02ae18fc37b84">scalable_free</a> (void *ptr)</td></tr>
<tr class="separator:ga2ad3952b8c4dd7d293e02ae18fc37b84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga40d6e0bc19cdfa3005b2b935c62077a1"><td class="memItemLeft" align="right" valign="top">void *__TBB_EXPORTED_FUNC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga40d6e0bc19cdfa3005b2b935c62077a1">scalable_realloc</a> (void *ptr, size_t size)</td></tr>
<tr class="separator:ga40d6e0bc19cdfa3005b2b935c62077a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3b4ff39555cd9e929fce2958325cd8ea"><td class="memItemLeft" align="right" valign="top">void *__TBB_EXPORTED_FUNC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga3b4ff39555cd9e929fce2958325cd8ea">scalable_calloc</a> (size_t nobj, size_t size)</td></tr>
<tr class="separator:ga3b4ff39555cd9e929fce2958325cd8ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf117b4994f719d539804da8dd115e28c"><td class="memItemLeft" align="right" valign="top">int __TBB_EXPORTED_FUNC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#gaf117b4994f719d539804da8dd115e28c">scalable_posix_memalign</a> (void **memptr, size_t alignment, size_t size)</td></tr>
<tr class="separator:gaf117b4994f719d539804da8dd115e28c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga903307de17bc1611515f8e6ae782a3d6"><td class="memItemLeft" align="right" valign="top">void *__TBB_EXPORTED_FUNC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga903307de17bc1611515f8e6ae782a3d6">scalable_aligned_malloc</a> (size_t size, size_t alignment)</td></tr>
<tr class="separator:ga903307de17bc1611515f8e6ae782a3d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa07391c54330b2e4dd1743ae9c9c4f2d"><td class="memItemLeft" align="right" valign="top">void *__TBB_EXPORTED_FUNC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#gaa07391c54330b2e4dd1743ae9c9c4f2d">scalable_aligned_realloc</a> (void *ptr, size_t size, size_t alignment)</td></tr>
<tr class="separator:gaa07391c54330b2e4dd1743ae9c9c4f2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad9aa7595581a7bc5be193d7e034c8f61"><td class="memItemLeft" align="right" valign="top">void __TBB_EXPORTED_FUNC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#gad9aa7595581a7bc5be193d7e034c8f61">scalable_aligned_free</a> (void *ptr)</td></tr>
<tr class="separator:gad9aa7595581a7bc5be193d7e034c8f61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2b718206e50acb6392b86e4877d98213"><td class="memItemLeft" align="right" valign="top">size_t __TBB_EXPORTED_FUNC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga2b718206e50acb6392b86e4877d98213">scalable_msize</a> (void *ptr)</td></tr>
<tr class="separator:ga2b718206e50acb6392b86e4877d98213"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7f5029970f72ebbffee896c46a23958e"><td class="memItemLeft" align="right" valign="top">int __TBB_EXPORTED_FUNC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga7f5029970f72ebbffee896c46a23958e">scalable_allocation_mode</a> (int param, intptr_t value)</td></tr>
<tr class="separator:ga7f5029970f72ebbffee896c46a23958e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabe5acd876b4d89bf89787c4e779c2518"><td class="memItemLeft" align="right" valign="top">int __TBB_EXPORTED_FUNC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#gabe5acd876b4d89bf89787c4e779c2518">scalable_allocation_command</a> (int cmd, void *param)</td></tr>
<tr class="separator:gabe5acd876b4d89bf89787c4e779c2518"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gad9aa7595581a7bc5be193d7e034c8f61"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void __TBB_EXPORTED_FUNC scalable_aligned_free </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>ptr</em>)</td><td></td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The "_aligned_free" analogue. </p>
</div>
</div>
<a class="anchor" id="ga903307de17bc1611515f8e6ae782a3d6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* __TBB_EXPORTED_FUNC scalable_aligned_malloc </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>alignment</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The "_aligned_malloc" analogue. </p>
</div>
</div>
<a class="anchor" id="gaa07391c54330b2e4dd1743ae9c9c4f2d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* __TBB_EXPORTED_FUNC scalable_aligned_realloc </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>alignment</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The "_aligned_realloc" analogue. </p>
</div>
</div>
<a class="anchor" id="gabe5acd876b4d89bf89787c4e779c2518"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int __TBB_EXPORTED_FUNC scalable_allocation_command </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>cmd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>param</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Call TBB allocator-specific commands. </p>
</div>
</div>
<a class="anchor" id="ga7f5029970f72ebbffee896c46a23958e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int __TBB_EXPORTED_FUNC scalable_allocation_mode </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>param</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">intptr_t&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set TBB allocator-specific allocation modes. </p>
</div>
</div>
<a class="anchor" id="ga3b4ff39555cd9e929fce2958325cd8ea"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* __TBB_EXPORTED_FUNC scalable_calloc </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>nobj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The "calloc" analogue complementing scalable_malloc. </p>
</div>
</div>
<a class="anchor" id="ga2ad3952b8c4dd7d293e02ae18fc37b84"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void __TBB_EXPORTED_FUNC scalable_free </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>ptr</em>)</td><td></td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The "free" analogue to discard a previously allocated piece of memory. </p>
<p>Referenced by <a class="el" href="a00111.html#a0632b19f25e5d5f86f18b3101925f488">tbb::scalable_allocator&lt; T &gt;::deallocate()</a>.</p>
</div>
</div>
<a class="anchor" id="ga2a5bdc71439a70b20f2eadf6e1a489e1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* __TBB_EXPORTED_FUNC scalable_malloc </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>)</td><td></td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The "malloc" analogue to allocate block of memory of size bytes. </p>
<p>Referenced by <a class="el" href="a00111.html#acf24945c12dc0586dfb1f8638daf7838">tbb::scalable_allocator&lt; T &gt;::allocate()</a>.</p>
</div>
</div>
<a class="anchor" id="ga2b718206e50acb6392b86e4877d98213"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t __TBB_EXPORTED_FUNC scalable_msize </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>ptr</em>)</td><td></td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The analogue of <em>msize/malloc_size/malloc_usable_size. Returns the usable size of a memory block previously allocated by scalable</em>*, or 0 (zero) if ptr does not point to such a block. </p>
</div>
</div>
<a class="anchor" id="gaf117b4994f719d539804da8dd115e28c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int __TBB_EXPORTED_FUNC scalable_posix_memalign </td>
<td>(</td>
<td class="paramtype">void **&#160;</td>
<td class="paramname"><em>memptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>alignment</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The "posix_memalign" analogue. </p>
</div>
</div>
<a class="anchor" id="ga40d6e0bc19cdfa3005b2b935c62077a1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* __TBB_EXPORTED_FUNC scalable_realloc </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The "realloc" analogue complementing scalable_malloc. </p>
</div>
</div>
</div><!-- contents -->
<hr>
<p></p>
Copyright &copy; 2005-2014 Intel Corporation. All Rights Reserved.
<p></p>
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
registered trademarks or trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
<p></p>
* Other names and brands may be claimed as the property of others.