]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <html> |
2 | <head> | |
3 | <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> | |
4 | <title>Struct default_user_allocator_new_delete</title> | |
5 | <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> | |
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.76.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_malloc_free.html" title="Struct default_user_allocator_malloc_free"> | |
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_malloc_free.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> | |
24 | </div> | |
25 | <div class="refentry"> | |
26 | <a name="boost.default_user_allocator_new_delete"></a><div class="titlepage"></div> | |
27 | <div class="refnamediv"> | |
28 | <h2><span class="refentrytitle">Struct default_user_allocator_new_delete</span></h2> | |
29 | <p>boost::default_user_allocator_new_delete — Allocator used as the default template parameter for a <a href="../boost_pool/pool/pooling.html#boost_pool.pool.pooling.user_allocator" target="_top">UserAllocator</a> template parameter. Uses new and delete. </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_new_delete.html" title="Struct default_user_allocator_new_delete">default_user_allocator_new_delete</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_new_delete.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_new_delete.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_new_delete.html#id376878-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_new_delete.html#id376880-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_new_delete.html#id376895-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="id927604"></a><h2>Description</h2> | |
46 | <div class="refsect2"> | |
47 | <a name="id927608"></a><h3> | |
48 | <a name="id376878-bb"></a><code class="computeroutput">default_user_allocator_new_delete</code> public static functions</h3> | |
49 | <div class="orderedlist"><ol class="orderedlist" type="1"> | |
50 | <li class="listitem"> | |
51 | <pre class="literallayout"><span class="keyword">static</span> <span class="keyword">char</span> <span class="special">*</span> <a name="id376880-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> | |
52 | <p>Attempts to allocate n bytes from the system. Returns 0 if out-of-memory </p> | |
53 | </li> | |
54 | <li class="listitem"> | |
55 | <pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id376895-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> | |
56 | <p>Attempts to de-allocate block. | |
57 | </p> | |
58 | <div class="variablelist"><table border="0"> | |
59 | <col align="left" valign="top"> | |
60 | <tbody><tr> | |
61 | <td><p><span class="term">Requires:</span></p></td> | |
62 | <td><p>Block must have been previously returned from a call to UserAllocator::malloc. </p></td> | |
63 | </tr></tbody> | |
64 | </table></div> | |
65 | </li> | |
66 | </ol></div> | |
67 | </div> | |
68 | </div> | |
69 | </div> | |
70 | <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> | |
71 | <td align="left"></td> | |
72 | <td align="right"><div class="copyright-footer">Copyright © 2000-2006 Stephen Cleary<br>Copyright © 2011 Paul A. Bristow<p> | |
73 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
74 | 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>) | |
75 | </p> | |
76 | </div></td> | |
77 | </tr></table> | |
78 | <hr> | |
79 | <div class="spirit-nav"> | |
80 | <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_malloc_free.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> | |
81 | </div> | |
82 | </body> | |
83 | </html> |