mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-20 14:09:32 +03:00
spelling: convenience
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
parent
87d70ac71e
commit
fe2dec15aa
4 changed files with 5 additions and 5 deletions
|
@ -888,7 +888,7 @@ void mi_free_aligned(void* p, size_t alignment);
|
|||
///
|
||||
/// Note: use the `mimalloc-new-delete.h` header to override the \a new
|
||||
/// and \a delete operators globally. The wrappers here are mostly
|
||||
/// for convience for library writers that need to interface with
|
||||
/// for convenience for library writers that need to interface with
|
||||
/// mimalloc from C++.
|
||||
///
|
||||
/// \{
|
||||
|
@ -1012,7 +1012,7 @@ to link with the static library. See `test\CMakeLists.txt` for an example.
|
|||
|
||||
### C++
|
||||
For best performance in C++ programs, it is also recommended to override the
|
||||
global `new` and `delete` operators. For convience, mimalloc provides
|
||||
global `new` and `delete` operators. For convenience, mimalloc provides
|
||||
[`mimalloc-new-delete.h`](https://github.com/microsoft/mimalloc/blob/master/include/mimalloc-new-delete.h) which does this for you -- just include it in a single(!) source file in your project.
|
||||
|
||||
In C++, mimalloc also provides the `mi_stl_allocator` struct which implements the `std::allocator`
|
||||
|
|
|
@ -137,7 +137,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<p><code>mi_</code> prefixed implementations of various allocation functions that use C++ semantics on out-of-memory, generally calling <code>std::get_new_handler</code> and raising a <code>std::bad_alloc</code> exception on failure. </p>
|
||||
<p>Note: use the <code>mimalloc-new-delete.h</code> header to override the <em>new</em> and <em>delete</em> operators globally. The wrappers here are mostly for convience for library writers that need to interface with mimalloc from C++. </p>
|
||||
<p>Note: use the <code>mimalloc-new-delete.h</code> header to override the <em>new</em> and <em>delete</em> operators globally. The wrappers here are mostly for convenience for library writers that need to interface with mimalloc from C++. </p>
|
||||
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
|
||||
<a name="structmi__stl__allocator" id="structmi__stl__allocator"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#structmi__stl__allocator">◆ </a></span>mi_stl_allocator</h2>
|
||||
|
|
|
@ -105,7 +105,7 @@ $(document).ready(function(){initNavTree('using.html',''); initResizable(); });
|
|||
</div><!-- fragment --><p> to link with the shared (dynamic) library, or: </p><div class="fragment"><div class="line">target_link_libraries(myapp PUBLIC mimalloc-<span class="keyword">static</span>)</div>
|
||||
</div><!-- fragment --><p> to link with the static library. See <code>test\CMakeLists.txt</code> for an example.</p>
|
||||
<h3>C++</h3>
|
||||
<p>For best performance in C++ programs, it is also recommended to override the global <code>new</code> and <code>delete</code> operators. For convience, mimalloc provides <a href="https://github.com/microsoft/mimalloc/blob/master/include/mimalloc-new-delete.h"><code>mimalloc-new-delete.h</code></a> which does this for you – just include it in a single(!) source file in your project without linking to the mimalloc's library.</p>
|
||||
<p>For best performance in C++ programs, it is also recommended to override the global <code>new</code> and <code>delete</code> operators. For convenience, mimalloc provides <a href="https://github.com/microsoft/mimalloc/blob/master/include/mimalloc-new-delete.h"><code>mimalloc-new-delete.h</code></a> which does this for you – just include it in a single(!) source file in your project without linking to the mimalloc's library.</p>
|
||||
<p>In C++, mimalloc also provides the <code><a class="el" href="group__cpp.html#structmi__stl__allocator" title="std::allocator implementation for mimalloc for use in STL containers.">mi_stl_allocator</a></code> struct which implements the <code>std::allocator</code> interface. For example: </p><div class="fragment"><div class="line">std::vector<some_struct, mi_stl_allocator<some_struct>> vec;</div>
|
||||
<div class="line">vec.push_back(some_struct());</div>
|
||||
</div><!-- fragment --><h3>Statistics</h3>
|
||||
|
|
|
@ -224,7 +224,7 @@ target_link_libraries(myapp PUBLIC mimalloc-static)
|
|||
to link with the static library. See `test\CMakeLists.txt` for an example.
|
||||
|
||||
For best performance in C++ programs, it is also recommended to override the
|
||||
global `new` and `delete` operators. For convience, mimalloc provides
|
||||
global `new` and `delete` operators. For convenience, mimalloc provides
|
||||
[`mimalloc-new-delete.h`](https://github.com/microsoft/mimalloc/blob/master/include/mimalloc-new-delete.h) which does this for you -- just include it in a single(!) source file in your project.
|
||||
In C++, mimalloc also provides the `mi_stl_allocator` struct which implements the `std::allocator`
|
||||
interface.
|
||||
|
|
Loading…
Add table
Reference in a new issue