1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Struct default_user_allocator_malloc_free</title> 5<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../index.html" title="Boost.Pool"> 8<link rel="up" href="../header/boost/pool/pool_hpp.html" title="Header <boost/pool/pool.hpp>"> 9<link rel="prev" href="../header/boost/pool/pool_hpp.html" title="Header <boost/pool/pool.hpp>"> 10<link rel="next" href="default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="default_user_allocator_new_delete.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="refentry"> 26<a name="boost.default_user_allocator_malloc_free"></a><div class="titlepage"></div> 27<div class="refnamediv"> 28<h2><span class="refentrytitle">Struct default_user_allocator_malloc_free</span></h2> 29<p>boost::default_user_allocator_malloc_free — <a href="../boost_pool/pool/pooling.html#boost_pool.pool.pooling.user_allocator" target="_top">UserAllocator</a> used as template parameter for <a class="link" href="pool.html" title="Class template pool">pool</a> and <a class="link" href="object_pool.html" title="Class template object_pool">object_pool</a>. Uses malloc and free internally. </p> 30</div> 31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../header/boost/pool/pool_hpp.html" title="Header <boost/pool/pool.hpp>">boost/pool/pool.hpp</a>> 33 34</span> 35<span class="keyword">struct</span> <a class="link" href="default_user_allocator_malloc_free.html" title="Struct default_user_allocator_malloc_free">default_user_allocator_malloc_free</a> <span class="special">{</span> 36 <span class="comment">// types</span> 37 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="boost.default_user_allocator_malloc_free.size_type"></a><span class="identifier">size_type</span><span class="special">;</span> <span class="comment">// An unsigned integral type that can represent the size of the largest object to be allocated. </span> 38 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <a name="boost.default_user_allocator_malloc_free.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span> <span class="comment">// A signed integral type that can represent the difference of any two pointers. </span> 39 40 <span class="comment">// <a class="link" href="default_user_allocator_malloc_free.html#idm45810844528560-bb">public static functions</a></span> 41 <span class="keyword">static</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="default_user_allocator_malloc_free.html#idm45810844528000-bb"><span class="identifier">malloc</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span> 42 <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="default_user_allocator_malloc_free.html#idm45810844525088-bb"><span class="identifier">free</span></a><span class="special">(</span><span class="keyword">char</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span> 43<span class="special">}</span><span class="special">;</span></pre></div> 44<div class="refsect1"> 45<a name="idm46412774180736"></a><h2>Description</h2> 46<div class="refsect2"> 47<a name="idm46412774180352"></a><h3> 48<a name="idm45810844528560-bb"></a><code class="computeroutput">default_user_allocator_malloc_free</code> public static functions</h3> 49<div class="orderedlist"><ol class="orderedlist" type="1"> 50<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">char</span> <span class="special">*</span> <a name="idm45810844528000-bb"></a><span class="identifier">malloc</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> bytes<span class="special">)</span><span class="special">;</span></pre></li> 51<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="idm45810844525088-bb"></a><span class="identifier">free</span><span class="special">(</span><span class="keyword">char</span> <span class="special">*</span><span class="keyword">const</span> block<span class="special">)</span><span class="special">;</span></pre></li> 52</ol></div> 53</div> 54</div> 55</div> 56<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 57<td align="left"></td> 58<td align="right"><div class="copyright-footer">Copyright © 2000-2006 Stephen Cleary<br>Copyright © 2011 Paul A. Bristow<p> 59 Distributed under the Boost Software License, Version 1.0. (See accompanying 60 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 61 </p> 62</div></td> 63</tr></table> 64<hr> 65<div class="spirit-nav"> 66<a accesskey="p" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="default_user_allocator_new_delete.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 67</div> 68</body> 69</html> 70