mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-02 13:49:31 +03:00
update to v1.8.8
This commit is contained in:
parent
a0a6ad3cf9
commit
98699c983a
36 changed files with 694 additions and 433 deletions
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2018-2021 Microsoft Corporation, Daan Leijen
|
||||
Copyright (c) 2018-2025 Microsoft Corporation, Daan Leijen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -8,7 +8,8 @@ trigger:
|
|||
include:
|
||||
- master
|
||||
- dev
|
||||
- dev-slice
|
||||
- dev2
|
||||
- dev3
|
||||
tags:
|
||||
include:
|
||||
- v*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
Copyright (c) 2018-2021, Microsoft Research, Daan Leijen
|
||||
Copyright (c) 2018-2025, Microsoft Research, Daan Leijen
|
||||
This is free software; you can redistribute it and/or modify it under the
|
||||
terms of the MIT license. A copy of the license can be found in the file
|
||||
"LICENSE" at the root of this distribution.
|
||||
|
@ -1303,25 +1303,31 @@ the [shell](https://stackoverflow.com/questions/43941322/dyld-insert-libraries-i
|
|||
|
||||
### Dynamic Override on Windows
|
||||
|
||||
<span id="override_on_windows">Dynamically overriding on mimalloc on Windows</span>
|
||||
is robust and has the particular advantage to be able to redirect all malloc/free calls that go through
|
||||
the (dynamic) C runtime allocator, including those from other DLL's or libraries.
|
||||
As it intercepts all allocation calls on a low level, it can be used reliably
|
||||
<span id="override_on_windows">Dynamically overriding on mimalloc on Windows</span>
|
||||
is robust and has the particular advantage to be able to redirect all malloc/free calls
|
||||
that go through the (dynamic) C runtime allocator, including those from other DLL's or
|
||||
libraries. As it intercepts all allocation calls on a low level, it can be used reliably
|
||||
on large programs that include other 3rd party components.
|
||||
There are four requirements to make the overriding work robustly:
|
||||
There are four requirements to make the overriding work well:
|
||||
|
||||
1. Use the C-runtime library as a DLL (using the `/MD` or `/MDd` switch).
|
||||
2. Link your program explicitly with `mimalloc-override.dll` library.
|
||||
To ensure the `mimalloc-override.dll` is loaded at run-time it is easiest to insert some
|
||||
call to the mimalloc API in the `main` function, like `mi_version()`
|
||||
(or use the `/INCLUDE:mi_version` switch on the linker). See the `mimalloc-override-test` project
|
||||
for an example on how to use this.
|
||||
3. The [`mimalloc-redirect.dll`](bin) (or `mimalloc-redirect32.dll`) must be put
|
||||
in the same folder as the main `mimalloc-override.dll` at runtime (as it is a dependency of that DLL).
|
||||
The redirection DLL ensures that all calls to the C runtime malloc API get redirected to
|
||||
mimalloc functions (which reside in `mimalloc-override.dll`).
|
||||
4. Ensure the `mimalloc-override.dll` comes as early as possible in the import
|
||||
|
||||
2. Link your program explicitly with the `mimalloc.lib` export library for the `mimalloc.dll`.
|
||||
(which must be compiled with `-DMI_OVERRIDE=ON`, which is the default though).
|
||||
To ensure the `mimalloc.dll` is actually loaded at run-time it is easiest
|
||||
to insert some call to the mimalloc API in the `main` function, like `mi_version()`
|
||||
(or use the `/include:mi_version` switch on the linker command, or
|
||||
similarly, `#pragma comment(linker, "/include:mi_version")` in some source file).
|
||||
See the `mimalloc-test-override` project for an example on how to use this.
|
||||
|
||||
3. The `mimalloc-redirect.dll` must be put in the same directory as the main
|
||||
`mimalloc.dll` at runtime (as it is a dependency of that DLL).
|
||||
The redirection DLL ensures that all calls to the C runtime malloc API get
|
||||
redirected to mimalloc functions (which reside in `mimalloc.dll`).
|
||||
|
||||
4. Ensure the `mimalloc.dll` comes as early as possible in the import
|
||||
list of the final executable (so it can intercept all potential allocations).
|
||||
You can use `minject -l <exe>` to check this if needed.
|
||||
|
||||
For best performance on Windows with C++, it
|
||||
is also recommended to also override the `new`/`delete` operations (by including
|
||||
|
@ -1329,15 +1335,14 @@ is also recommended to also override the `new`/`delete` operations (by including
|
|||
a single(!) source file in your project).
|
||||
|
||||
The environment variable `MIMALLOC_DISABLE_REDIRECT=1` can be used to disable dynamic
|
||||
overriding at run-time. Use `MIMALLOC_VERBOSE=1` to check if mimalloc was successfully redirected.
|
||||
overriding at run-time. Use `MIMALLOC_VERBOSE=1` to check if mimalloc was successfully
|
||||
redirected.
|
||||
|
||||
For different platforms than x64, you may need a specific [redirection dll](bin).
|
||||
Furthermore, we cannot always re-link an executable or ensure `mimalloc.dll` comes
|
||||
first in the import table. In such cases the [`minject`](bin) tool can be used
|
||||
to patch the executable's import tables.
|
||||
|
||||
We cannot always re-link an executable with `mimalloc-override.dll`, and similarly, we cannot always
|
||||
ensure the the DLL comes first in the import table of the final executable.
|
||||
In many cases though we can patch existing executables without any recompilation
|
||||
if they are linked with the dynamic C runtime (`ucrtbase.dll`) -- just put the `mimalloc-override.dll`
|
||||
into the import table (and put `mimalloc-redirect.dll` in the same folder)
|
||||
Such patching can be done for example with [CFF Explorer](https://ntcore.com/?page_id=388) or
|
||||
the [`minject`](bin) program.
|
||||
|
||||
## Static override
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ RUN mkdir -p /home/dev
|
|||
WORKDIR /home/dev
|
||||
|
||||
# Get mimalloc
|
||||
RUN git clone https://github.com/microsoft/mimalloc -b dev-slice
|
||||
RUN git clone https://github.com/microsoft/mimalloc -b dev2
|
||||
RUN mkdir -p mimalloc/out/release
|
||||
RUN mkdir -p mimalloc/out/debug
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ RUN mkdir -p /home/dev
|
|||
WORKDIR /home/dev
|
||||
|
||||
# Get mimalloc
|
||||
RUN git clone https://github.com/microsoft/mimalloc -b dev-slice
|
||||
RUN git clone https://github.com/microsoft/mimalloc -b dev2
|
||||
RUN mkdir -p mimalloc/out/release
|
||||
RUN mkdir -p mimalloc/out/debug
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ RUN mkdir -p /home/dev
|
|||
WORKDIR /home/dev
|
||||
|
||||
# Get mimalloc
|
||||
RUN git clone https://github.com/microsoft/mimalloc -b dev-slice
|
||||
RUN git clone https://github.com/microsoft/mimalloc -b dev2
|
||||
RUN mkdir -p mimalloc/out/release
|
||||
RUN mkdir -p mimalloc/out/debug
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Data Structures</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -110,7 +110,7 @@ $(function(){initNavTree('annotated.html',''); initResizable(true); });
|
|||
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
|
||||
<table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="group__analysis.html#structmi__heap__area__t" target="_self">mi_heap_area_t</a></td><td class="desc">An area of heap space contains blocks of a single size </td></tr>
|
||||
<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="group__cpp.html#structmi__stl__allocator" target="_self">mi_stl_allocator</a></td><td class="desc"><em>std::allocator</em> implementation for mimalloc for use in STL containers </td></tr>
|
||||
<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="group__cpp.html#structmi__stl__allocator" target="_self">mi_stl_allocator</a></td><td class="desc"><em class="arg">std::allocator</em> implementation for mimalloc for use in STL containers </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
|
@ -118,7 +118,7 @@ $(function(){initNavTree('annotated.html',''); initResizable(true); });
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Performance</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -116,7 +116,7 @@ $(function(){initNavTree('bench.html',''); initResizable(true); });
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Building</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -139,7 +139,7 @@ $(function(){initNavTree('build.html',''); initResizable(true); });
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Data Structure Index</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -118,7 +118,7 @@ $(function(){initNavTree('classes.html',''); initResizable(true); });
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* The standard CSS for doxygen 1.11.0*/
|
||||
/* The standard CSS for doxygen 1.13.1*/
|
||||
|
||||
body {
|
||||
background-color: white;
|
||||
|
@ -1057,7 +1057,7 @@ table.fieldtable {
|
|||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
.fieldtable td.fieldtype, .fieldtable td.fieldname {
|
||||
.fieldtable td.fieldtype, .fieldtable td.fieldname, .fieldtable td.fieldinit {
|
||||
white-space: nowrap;
|
||||
border-right: 1px solid #697273;
|
||||
border-bottom: 1px solid #697273;
|
||||
|
@ -1068,6 +1068,12 @@ table.fieldtable {
|
|||
padding-top: 3px;
|
||||
}
|
||||
|
||||
.fieldtable td.fieldinit {
|
||||
padding-top: 3px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
.fieldtable td.fielddoc {
|
||||
border-bottom: 1px solid #697273;
|
||||
}
|
||||
|
@ -1416,6 +1422,11 @@ dl.invariant dt, dl.pre dt, dl.post dt {
|
|||
padding: 2px 0px;
|
||||
}
|
||||
|
||||
#side-nav #projectname
|
||||
{
|
||||
font-size: 130%;
|
||||
}
|
||||
|
||||
#projectbrief
|
||||
{
|
||||
font-size: 90%;
|
||||
|
@ -1522,20 +1533,17 @@ div.toc ul {
|
|||
padding: 0px;
|
||||
}
|
||||
|
||||
div.toc li[class^='level'] {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
div.toc li.level1 {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
div.toc li.level2 {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
div.toc li.level3 {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
div.toc li.level4 {
|
||||
margin-left: 15px;
|
||||
div.toc li.empty {
|
||||
background-image: none;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
span.emoji {
|
||||
|
@ -1806,10 +1814,14 @@ th.markdownTableHeadCenter, td.markdownTableBodyCenter {
|
|||
text-align: center
|
||||
}
|
||||
|
||||
tt, code, kbd, samp
|
||||
tt, code, kbd
|
||||
{
|
||||
display: inline-block;
|
||||
}
|
||||
tt, code, kbd
|
||||
{
|
||||
vertical-align: top;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
u {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Environment Options</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -132,7 +132,7 @@ $(function(){initNavTree('environment.html',''); initResizable(true); });
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Data Fields</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -118,7 +118,7 @@ $(function(){initNavTree('functions.html',''); initResizable(true); });
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Data Fields - Variables</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -118,7 +118,7 @@ $(function(){initNavTree('functions_vars.html',''); initResizable(true); });
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Aligned Allocation</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -109,11 +109,14 @@ $(function(){initNavTree('group__aligned.html',''); initResizable(true); });
|
|||
<div class="headertitle"><div class="title">Aligned Allocation</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Allocating aligned memory blocks.
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga69578ff1a98ca16e1dcd02c0995cd65c" id="r_ga69578ff1a98ca16e1dcd02c0995cd65c"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga69578ff1a98ca16e1dcd02c0995cd65c">mi_malloc_aligned</a> (size_t size, size_t alignment)</td></tr>
|
||||
<tr class="memdesc:ga69578ff1a98ca16e1dcd02c0995cd65c"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>size</em> bytes aligned by <em>alignment</em>. <br /></td></tr>
|
||||
<tr class="memdesc:ga69578ff1a98ca16e1dcd02c0995cd65c"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em class="arg">size</em> bytes aligned by <em class="arg">alignment</em>. <br /></td></tr>
|
||||
<tr class="separator:ga69578ff1a98ca16e1dcd02c0995cd65c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaac7d0beb782f9b9ac31f47492b130f82" id="r_gaac7d0beb782f9b9ac31f47492b130f82"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gaac7d0beb782f9b9ac31f47492b130f82">mi_zalloc_aligned</a> (size_t size, size_t alignment)</td></tr>
|
||||
<tr class="separator:gaac7d0beb782f9b9ac31f47492b130f82"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
|
@ -122,7 +125,7 @@ Functions</h2></td></tr>
|
|||
<tr class="memitem:ga5d7a46d054b4d7abe9d8d2474add2edf" id="r_ga5d7a46d054b4d7abe9d8d2474add2edf"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5d7a46d054b4d7abe9d8d2474add2edf">mi_realloc_aligned</a> (void *p, size_t newsize, size_t alignment)</td></tr>
|
||||
<tr class="separator:ga5d7a46d054b4d7abe9d8d2474add2edf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga2022f71b95a7cd6cce1b6e07752ae8ca" id="r_ga2022f71b95a7cd6cce1b6e07752ae8ca"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga2022f71b95a7cd6cce1b6e07752ae8ca">mi_malloc_aligned_at</a> (size_t size, size_t alignment, size_t offset)</td></tr>
|
||||
<tr class="memdesc:ga2022f71b95a7cd6cce1b6e07752ae8ca"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>size</em> bytes aligned by <em>alignment</em> at a specified <em>offset</em>. <br /></td></tr>
|
||||
<tr class="memdesc:ga2022f71b95a7cd6cce1b6e07752ae8ca"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em class="arg">size</em> bytes aligned by <em class="arg">alignment</em> at a specified <em class="arg">offset</em>. <br /></td></tr>
|
||||
<tr class="separator:ga2022f71b95a7cd6cce1b6e07752ae8ca"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga7c1778805ce50ebbf02ccbd5e39d5dba" id="r_ga7c1778805ce50ebbf02ccbd5e39d5dba"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga7c1778805ce50ebbf02ccbd5e39d5dba">mi_zalloc_aligned_at</a> (size_t size, size_t alignment, size_t offset)</td></tr>
|
||||
<tr class="separator:ga7c1778805ce50ebbf02ccbd5e39d5dba"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
|
@ -132,7 +135,8 @@ Functions</h2></td></tr>
|
|||
<tr class="separator:gad06dcf2bb8faadb2c8ea61ee5d24bbf6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<p>Allocating aligned memory blocks. Note that <code>alignment</code> always follows <code>size</code> for consistency with the unaligned allocation API, but unfortunately this differs from <code>posix_memalign</code> and <code>aligned_alloc</code> in the C library. </p>
|
||||
<p>Allocating aligned memory blocks. </p>
|
||||
<p>Note that <code>alignment</code> always follows <code>size</code> for consistency with the unaligned allocation API, but unfortunately this differs from <code>posix_memalign</code> and <code>aligned_alloc</code> in the C library. </p>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga424ef386fb1f9f8e0a86ab53f16eaaf1" name="ga424ef386fb1f9f8e0a86ab53f16eaaf1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga424ef386fb1f9f8e0a86ab53f16eaaf1">◆ </a></span>mi_calloc_aligned()</h2>
|
||||
|
@ -210,16 +214,15 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate <em>size</em> bytes aligned by <em>alignment</em>. </p>
|
||||
<p>Allocate <em class="arg">size</em> bytes aligned by <em class="arg">alignment</em>. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">size</td><td>number of bytes to allocate. </td></tr>
|
||||
<tr><td class="paramname">alignment</td><td>the minimal alignment of the allocated memory. <br />
|
||||
</td></tr>
|
||||
<tr><td class="paramname">alignment</td><td>the minimal alignment of the allocated memory. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory or <em>NULL</em> if out of memory, or if the alignment is not a power of 2 (including 0). The <em>size</em> is unrestricted (and does not have to be an integral multiple of the <em>alignment</em>). The returned pointer is aligned by <em>alignment</em>, i.e. <code>(uintptr_t)p % alignment == 0</code>. Returns a unique pointer if called with <em>size</em> 0.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory or <em class="arg">NULL</em> if out of memory, or if the alignment is not a power of 2 (including 0). The <em class="arg">size</em> is unrestricted (and does not have to be an integral multiple of the <em class="arg">alignment</em>). The returned pointer is aligned by <em class="arg">alignment</em>, i.e. <code>(uintptr_t)p % alignment == 0</code>. Returns a unique pointer if called with <em class="arg">size</em> 0.</dd></dl>
|
||||
<p>Note that <code>alignment</code> always follows <code>size</code> for consistency with the unaligned allocation API, but unfortunately this differs from <code>posix_memalign</code> and <code>aligned_alloc</code> in the C library.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a href="https://en.cppreference.com/w/c/memory/aligned_alloc">aligned_alloc</a> (in the standard C11 library, with switched arguments!) </dd>
|
||||
<dd>
|
||||
|
@ -257,16 +260,16 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate <em>size</em> bytes aligned by <em>alignment</em> at a specified <em>offset</em>. </p>
|
||||
<p>Allocate <em class="arg">size</em> bytes aligned by <em class="arg">alignment</em> at a specified <em class="arg">offset</em>. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">size</td><td>number of bytes to allocate. </td></tr>
|
||||
<tr><td class="paramname">alignment</td><td>the minimal alignment of the allocated memory at <em>offset</em>. </td></tr>
|
||||
<tr><td class="paramname">alignment</td><td>the minimal alignment of the allocated memory at <em class="arg">offset</em>. </td></tr>
|
||||
<tr><td class="paramname">offset</td><td>the offset that should be aligned. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory or <em>NULL</em> if out of memory, or if the alignment is not a power of 2 (including 0). The <em>size</em> is unrestricted (and does not have to be an integral multiple of the <em>alignment</em>). The returned pointer is aligned by <em>alignment</em>, i.e. <code>(uintptr_t)p % alignment == 0</code>. Returns a unique pointer if called with <em>size</em> 0.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory or <em class="arg">NULL</em> if out of memory, or if the alignment is not a power of 2 (including 0). The <em class="arg">size</em> is unrestricted (and does not have to be an integral multiple of the <em class="arg">alignment</em>). The returned pointer is aligned by <em class="arg">alignment</em>, i.e. <code>(uintptr_t)p % alignment == 0</code>. Returns a unique pointer if called with <em class="arg">size</em> 0.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/aligned-offset-malloc?view=vs-2017">_aligned_offset_malloc</a> (on Windows) </dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -380,7 +383,7 @@ Functions</h2></td></tr>
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Heap Introspection</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -111,6 +111,9 @@ $(function(){initNavTree('group__analysis.html',''); initResizable(true); });
|
|||
<div class="headertitle"><div class="title">Heap Introspection</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Inspect the heap at runtime.
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
||||
Data Structures</h2></td></tr>
|
||||
|
@ -189,7 +192,7 @@ size in bytes of a full block including padding and metadata. </td></tr>
|
|||
<td class="fieldname">
|
||||
heap_tag</td>
|
||||
<td class="fielddoc">
|
||||
heap tag associated with this area (see <em>mi_heap_new_ex</em>) </td></tr>
|
||||
heap tag associated with this area (see <em class="arg">mi_heap_new_ex</em>) </td></tr>
|
||||
<tr><td class="fieldtype">
|
||||
<a id="ae848a3e6840414891035423948ca0383" name="ae848a3e6840414891035423948ca0383"></a>size_t</td>
|
||||
<td class="fieldname">
|
||||
|
@ -220,8 +223,8 @@ bytes in use by allocated blocks </td></tr>
|
|||
</div><div class="memdoc">
|
||||
|
||||
<p>Visitor function passed to <a class="el" href="#ga70c46687dc6e9dc98b232b02646f8bed" title="Visit all areas and blocks in a heap.">mi_heap_visit_blocks()</a> </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em>true</em> if ok, <em>false</em> to stop visiting (i.e. break)</dd></dl>
|
||||
<p>This function is always first called for every <em>area</em> with <em>block</em> as a <em>NULL</em> pointer. If <em>visit_all_blocks</em> was <em>true</em>, the function is then called for every allocated block in that area. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em class="arg">true</em> if ok, <em class="arg">false</em> to stop visiting (i.e. break)</dd></dl>
|
||||
<p>This function is always first called for every <em class="arg">area</em> with <em class="arg">block</em> as a <em class="arg">NULL</em> pointer. If <em class="arg">visit_all_blocks</em> was <em class="arg">true</em>, the function is then called for every allocated block in that area. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -263,15 +266,15 @@ bytes in use by allocated blocks </td></tr>
|
|||
<p>Visit all areas and blocks in abandoned heaps. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">subproc_id</td><td>The sub-process id associated with the abandonded heaps. </td></tr>
|
||||
<tr><td class="paramname">subproc_id</td><td>The sub-process id associated with the abandoned heaps. </td></tr>
|
||||
<tr><td class="paramname">heap_tag</td><td>Visit only abandoned memory with the specified heap tag, use -1 to visit all abandoned memory. </td></tr>
|
||||
<tr><td class="paramname">visit_blocks</td><td>If <em>true</em> visits all allocated blocks, otherwise <em>visitor</em> is only called for every heap area. </td></tr>
|
||||
<tr><td class="paramname">visitor</td><td>This function is called for every area in the heap (with <em>block</em> as <em>NULL</em>). If <em>visit_all_blocks</em> is <em>true</em>, <em>visitor</em> is also called for every allocated block in every area (with <code>block!=NULL</code>). return <em>false</em> from this function to stop visiting early. </td></tr>
|
||||
<tr><td class="paramname">arg</td><td>extra argument passed to the <em>visitor</em>. </td></tr>
|
||||
<tr><td class="paramname">visit_blocks</td><td>If <em class="arg">true</em> visits all allocated blocks, otherwise <em class="arg">visitor</em> is only called for every heap area. </td></tr>
|
||||
<tr><td class="paramname">visitor</td><td>This function is called for every area in the heap (with <em class="arg">block</em> as <em class="arg">NULL</em>). If <em class="arg">visit_all_blocks</em> is <em class="arg">true</em>, <em class="arg">visitor</em> is also called for every allocated block in every area (with <code>block!=NULL</code>). return <em class="arg">false</em> from this function to stop visiting early. </td></tr>
|
||||
<tr><td class="paramname">arg</td><td>extra argument passed to the <em class="arg">visitor</em>. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em>true</em> if all areas and blocks were visited.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em class="arg">true</em> if all areas and blocks were visited.</dd></dl>
|
||||
<p>Note: requires the option <code>mi_option_visit_abandoned</code> to be set at the start of the program. </p>
|
||||
|
||||
</div>
|
||||
|
@ -298,7 +301,7 @@ bytes in use by allocated blocks </td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em>true</em> if <em>p</em> points to a block in default heap of this thread.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em class="arg">true</em> if <em class="arg">p</em> points to a block in default heap of this thread.</dd></dl>
|
||||
<p>Note: expensive function, linear in the pages in the heap. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="#gaa862aa8ed8d57d84cae41fc1022d71af" title="Does a heap contain a pointer to a previously allocated block?">mi_heap_contains_block()</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__heap.html#ga14c667a6e2c5d28762d8cb7d4e057909" title="Get the default heap that is used for mi_malloc() et al.">mi_heap_get_default()</a> </dd></dl>
|
||||
|
@ -332,7 +335,7 @@ bytes in use by allocated blocks </td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em>true</em> if <em>p</em> points to a block in <em>heap</em>.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em class="arg">true</em> if <em class="arg">p</em> points to a block in <em class="arg">heap</em>.</dd></dl>
|
||||
<p>Note: expensive function, linear in the pages in the heap. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="#gaa862aa8ed8d57d84cae41fc1022d71af" title="Does a heap contain a pointer to a previously allocated block?">mi_heap_contains_block()</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__heap.html#ga14c667a6e2c5d28762d8cb7d4e057909" title="Get the default heap that is used for mi_malloc() et al.">mi_heap_get_default()</a> </dd></dl>
|
||||
|
@ -366,7 +369,7 @@ bytes in use by allocated blocks </td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em>true</em> if the block pointed to by <em>p</em> is in the <em>heap</em>. </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em class="arg">true</em> if the block pointed to by <em class="arg">p</em> is in the <em class="arg">heap</em>. </dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="#ga0d67c1789faaa15ff366c024fcaf6377" title="Check safely if any pointer is part of a heap.">mi_heap_check_owned()</a> </dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -404,13 +407,13 @@ bytes in use by allocated blocks </td></tr>
|
|||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">heap</td><td>The heap to visit. </td></tr>
|
||||
<tr><td class="paramname">visit_all_blocks</td><td>If <em>true</em> visits all allocated blocks, otherwise <em>visitor</em> is only called for every heap area. </td></tr>
|
||||
<tr><td class="paramname">visitor</td><td>This function is called for every area in the heap (with <em>block</em> as <em>NULL</em>). If <em>visit_all_blocks</em> is <em>true</em>, <em>visitor</em> is also called for every allocated block in every area (with <code>block!=NULL</code>). return <em>false</em> from this function to stop visiting early. </td></tr>
|
||||
<tr><td class="paramname">arg</td><td>Extra argument passed to <em>visitor</em>. </td></tr>
|
||||
<tr><td class="paramname">visit_all_blocks</td><td>If <em class="arg">true</em> visits all allocated blocks, otherwise <em class="arg">visitor</em> is only called for every heap area. </td></tr>
|
||||
<tr><td class="paramname">visitor</td><td>This function is called for every area in the heap (with <em class="arg">block</em> as <em class="arg">NULL</em>). If <em class="arg">visit_all_blocks</em> is <em class="arg">true</em>, <em class="arg">visitor</em> is also called for every allocated block in every area (with <code>block!=NULL</code>). return <em class="arg">false</em> from this function to stop visiting early. </td></tr>
|
||||
<tr><td class="paramname">arg</td><td>Extra argument passed to <em class="arg">visitor</em>. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em>true</em> if all areas and blocks were visited. </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em class="arg">true</em> if all areas and blocks were visited. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -419,7 +422,7 @@ bytes in use by allocated blocks </td></tr>
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: C++ wrappers</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -110,11 +110,14 @@ $(function(){initNavTree('group__cpp.html',''); initResizable(true); });
|
|||
<div class="headertitle"><div class="title">C++ wrappers</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<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.
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
||||
Data Structures</h2></td></tr>
|
||||
<tr class="memitem:structmi__stl__allocator" id="r_structmi__stl__allocator"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="#structmi__stl__allocator">mi_stl_allocator< T ></a></td></tr>
|
||||
<tr class="memdesc:structmi__stl__allocator"><td class="mdescLeft"> </td><td class="mdescRight"><em>std::allocator</em> implementation for mimalloc for use in STL containers. <a href="#structmi__stl__allocator">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:structmi__stl__allocator"><td class="mdescLeft"> </td><td class="mdescRight"><em class="arg">std::allocator</em> implementation for mimalloc for use in STL containers. <a href="#structmi__stl__allocator">More...</a><br /></td></tr>
|
||||
<tr class="separator:structmi__stl__allocator"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
|
@ -129,10 +132,10 @@ Functions</h2></td></tr>
|
|||
<tr class="memdesc:ga79c54da0b4b4ce9fcc11d2f6ef6675f8"><td class="mdescLeft"> </td><td class="mdescRight">like <a class="el" href="group__aligned.html#ga69578ff1a98ca16e1dcd02c0995cd65c" title="Allocate size bytes aligned by alignment.">mi_malloc_aligned()</a>, but when out of memory, use <code>std::get_new_handler</code> and raise <code>std::bad_alloc</code> exception on failure. <br /></td></tr>
|
||||
<tr class="separator:ga79c54da0b4b4ce9fcc11d2f6ef6675f8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5cb4f120d1f7296074256215aa9a9e54" id="r_ga5cb4f120d1f7296074256215aa9a9e54"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5cb4f120d1f7296074256215aa9a9e54">mi_new_nothrow</a> (size_t n)</td></tr>
|
||||
<tr class="memdesc:ga5cb4f120d1f7296074256215aa9a9e54"><td class="mdescLeft"> </td><td class="mdescRight">like <code>mi_malloc</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em>NULL</em> on failure. <br /></td></tr>
|
||||
<tr class="memdesc:ga5cb4f120d1f7296074256215aa9a9e54"><td class="mdescLeft"> </td><td class="mdescRight">like <code>mi_malloc</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em class="arg">NULL</em> on failure. <br /></td></tr>
|
||||
<tr class="separator:ga5cb4f120d1f7296074256215aa9a9e54"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga92ae00b6dd64406c7e64557711ec04b7" id="r_ga92ae00b6dd64406c7e64557711ec04b7"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga92ae00b6dd64406c7e64557711ec04b7">mi_new_aligned_nothrow</a> (size_t n, size_t alignment)</td></tr>
|
||||
<tr class="memdesc:ga92ae00b6dd64406c7e64557711ec04b7"><td class="mdescLeft"> </td><td class="mdescRight">like <code>mi_malloc_aligned</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em>NULL</em> on failure. <br /></td></tr>
|
||||
<tr class="memdesc:ga92ae00b6dd64406c7e64557711ec04b7"><td class="mdescLeft"> </td><td class="mdescRight">like <code>mi_malloc_aligned</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em class="arg">NULL</em> on failure. <br /></td></tr>
|
||||
<tr class="separator:ga92ae00b6dd64406c7e64557711ec04b7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6867d89baf992728e0cc20a1f47db4d0" id="r_ga6867d89baf992728e0cc20a1f47db4d0"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga6867d89baf992728e0cc20a1f47db4d0">mi_new_realloc</a> (void *p, size_t newsize)</td></tr>
|
||||
<tr class="memdesc:ga6867d89baf992728e0cc20a1f47db4d0"><td class="mdescLeft"> </td><td class="mdescRight">like <a class="el" href="group__malloc.html#ga0621af6a5e3aa384e6a1b548958bf583" title="Re-allocate memory to newsize bytes.">mi_realloc()</a>, but when out of memory, use <code>std::get_new_handler</code> and raise <code>std::bad_alloc</code> exception on failure. <br /></td></tr>
|
||||
|
@ -142,8 +145,8 @@ Functions</h2></td></tr>
|
|||
<tr class="separator:gaace912ce086682d56f3ce9f7638d9d67"><td class="memSeparator" colspan="2"> </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 convenience for library writers that need to interface with mimalloc from C++. </p>
|
||||
<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 class="arg">new</em> and <em class="arg">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>
|
||||
|
@ -157,7 +160,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
<div class="textblock"><div class="compoundTemplParams">template<class T><br />
|
||||
struct mi_stl_allocator< T ></div><p><em>std::allocator</em> implementation for mimalloc for use in STL containers. </p>
|
||||
struct mi_stl_allocator< T ></div><p><em class="arg">std::allocator</em> implementation for mimalloc for use in STL containers. </p>
|
||||
<p>For example: </p><div class="fragment"><div class="line">std::vector<int, mi_stl_allocator<int> > vec;</div>
|
||||
<div class="line">vec.push_back(1);</div>
|
||||
<div class="line">vec.pop_back();</div>
|
||||
|
@ -226,7 +229,7 @@ struct mi_stl_allocator< T ></div><p><em>std::allocator</em> implementatio
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>like <code>mi_malloc_aligned</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em>NULL</em> on failure. </p>
|
||||
<p>like <code>mi_malloc_aligned</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em class="arg">NULL</em> on failure. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -268,7 +271,7 @@ struct mi_stl_allocator< T ></div><p><em>std::allocator</em> implementatio
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>like <code>mi_malloc</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em>NULL</em> on failure. </p>
|
||||
<p>like <code>mi_malloc</code>, but when out of memory, use <code>std::get_new_handler</code> but return <em class="arg">NULL</em> on failure. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -328,7 +331,7 @@ struct mi_stl_allocator< T ></div><p><em>std::allocator</em> implementatio
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Extended Functions</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -196,13 +196,13 @@ Functions</h2></td></tr>
|
|||
<tr class="memdesc:ga4c6486a1fdcd7a423b5f25fe4be8e0cf"><td class="mdescLeft"> </td><td class="mdescRight">Manage a particular memory area for use by mimalloc. <br /></td></tr>
|
||||
<tr class="separator:ga4c6486a1fdcd7a423b5f25fe4be8e0cf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3132f521fb756fc0e8ec0b74fb58df50" id="r_ga3132f521fb756fc0e8ec0b74fb58df50"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga3132f521fb756fc0e8ec0b74fb58df50">mi_reserve_huge_os_pages_interleave</a> (size_t pages, size_t numa_nodes, size_t timeout_msecs)</td></tr>
|
||||
<tr class="memdesc:ga3132f521fb756fc0e8ec0b74fb58df50"><td class="mdescLeft"> </td><td class="mdescRight">Reserve <em>pages</em> of huge OS pages (1GiB) evenly divided over <em>numa_nodes</em> nodes, but stops after at most <code>timeout_msecs</code> seconds. <br /></td></tr>
|
||||
<tr class="memdesc:ga3132f521fb756fc0e8ec0b74fb58df50"><td class="mdescLeft"> </td><td class="mdescRight">Reserve <em class="arg">pages</em> of huge OS pages (1GiB) evenly divided over <em class="arg">numa_nodes</em> nodes, but stops after at most <code>timeout_msecs</code> seconds. <br /></td></tr>
|
||||
<tr class="separator:ga3132f521fb756fc0e8ec0b74fb58df50"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga7795a13d20087447281858d2c771cca1" id="r_ga7795a13d20087447281858d2c771cca1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga7795a13d20087447281858d2c771cca1">mi_reserve_huge_os_pages_at</a> (size_t pages, int numa_node, size_t timeout_msecs)</td></tr>
|
||||
<tr class="memdesc:ga7795a13d20087447281858d2c771cca1"><td class="mdescLeft"> </td><td class="mdescRight">Reserve <em>pages</em> of huge OS pages (1GiB) at a specific <em>numa_node</em>, but stops after at most <code>timeout_msecs</code> seconds. <br /></td></tr>
|
||||
<tr class="memdesc:ga7795a13d20087447281858d2c771cca1"><td class="mdescLeft"> </td><td class="mdescRight">Reserve <em class="arg">pages</em> of huge OS pages (1GiB) at a specific <em class="arg">numa_node</em>, but stops after at most <code>timeout_msecs</code> seconds. <br /></td></tr>
|
||||
<tr class="separator:ga7795a13d20087447281858d2c771cca1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaad25050b19f30cd79397b227e0157a3f" id="r_gaad25050b19f30cd79397b227e0157a3f"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#gaad25050b19f30cd79397b227e0157a3f">mi_is_redirected</a> ()</td></tr>
|
||||
<tr class="memdesc:gaad25050b19f30cd79397b227e0157a3f"><td class="mdescLeft"> </td><td class="mdescRight">Is the C runtime <em>malloc</em> API redirected? <br /></td></tr>
|
||||
<tr class="memdesc:gaad25050b19f30cd79397b227e0157a3f"><td class="mdescLeft"> </td><td class="mdescRight">Is the C runtime <em class="arg">malloc</em> API redirected? <br /></td></tr>
|
||||
<tr class="separator:gaad25050b19f30cd79397b227e0157a3f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga7d862c2affd5790381da14eb102a364d" id="r_ga7d862c2affd5790381da14eb102a364d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga7d862c2affd5790381da14eb102a364d">mi_process_info</a> (size_t *elapsed_msecs, size_t *user_msecs, size_t *system_msecs, size_t *current_rss, size_t *peak_rss, size_t *current_commit, size_t *peak_commit, size_t *page_faults)</td></tr>
|
||||
<tr class="memdesc:ga7d862c2affd5790381da14eb102a364d"><td class="mdescLeft"> </td><td class="mdescRight">Return process information (time and memory usage). <br /></td></tr>
|
||||
|
@ -293,7 +293,7 @@ Functions</h2></td></tr>
|
|||
<p>Type of deferred free functions. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">force</td><td>If <em>true</em> all outstanding items should be freed. </td></tr>
|
||||
<tr><td class="paramname">force</td><td>If <em class="arg">true</em> all outstanding items should be freed. </td></tr>
|
||||
<tr><td class="paramname">heartbeat</td><td>A monotonically increasing count. </td></tr>
|
||||
<tr><td class="paramname">arg</td><td>Argument that was passed at registration to hold extra state.</td></tr>
|
||||
</table>
|
||||
|
@ -418,7 +418,7 @@ Functions</h2></td></tr>
|
|||
<p>Eagerly free memory. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">force</td><td>If <em>true</em>, aggressively return memory to the OS (can be expensive!)</td></tr>
|
||||
<tr><td class="paramname">force</td><td>If <em class="arg">true</em>, aggressively return memory to the OS (can be expensive!)</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -518,13 +518,13 @@ Functions</h2></td></tr>
|
|||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">heap_tag</td><td>The heap tag associated with this heap; heaps only reclaim memory between heaps with the same tag. </td></tr>
|
||||
<tr><td class="paramname">allow_destroy</td><td>Is <em>mi_heap_destroy</em> allowed? Not allowing this allows the heap to reclaim memory from terminated threads. </td></tr>
|
||||
<tr><td class="paramname">allow_destroy</td><td>Is <em class="arg">mi_heap_destroy</em> allowed? Not allowing this allows the heap to reclaim memory from terminated threads. </td></tr>
|
||||
<tr><td class="paramname">arena_id</td><td>If not 0, the heap will only allocate from the specified arena. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A new heap or <code>NULL</code> on failure.</dd></dl>
|
||||
<p>The <em>arena_id</em> can be used by runtimes to allocate only in a specified pre-reserved arena. This is used for example for a compressed pointer heap in Koka. The <em>heap_tag</em> enables heaps to keep objects of a certain type isolated to heaps with that tag. This is used for example in the CPython integration. </p>
|
||||
<p>The <em class="arg">arena_id</em> can be used by runtimes to allocate only in a specified pre-reserved arena. This is used for example for a compressed pointer heap in Koka. The <em class="arg">heap_tag</em> enables heaps to keep objects of a certain type isolated to heaps with that tag. This is used for example in the CPython integration. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -576,7 +576,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em>true</em> if this is a pointer into our heap. This function is relatively fast. </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em class="arg">true</em> if this is a pointer into our heap. This function is relatively fast. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -595,8 +595,8 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Is the C runtime <em>malloc</em> API redirected? </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em>true</em> if all malloc API calls are redirected to mimalloc.</dd></dl>
|
||||
<p>Is the C runtime <em class="arg">malloc</em> API redirected? </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em class="arg">true</em> if all malloc API calls are redirected to mimalloc.</dd></dl>
|
||||
<p>Currently only used on Windows. </p>
|
||||
|
||||
</div>
|
||||
|
@ -623,7 +623,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a pointer to newly allocated memory of at least <em>size</em> bytes, or <em>NULL</em> if out of memory. This function is meant for use in run-time systems for best performance and does not check if <em>size</em> was indeed small – use with care! </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a pointer to newly allocated memory of at least <em class="arg">size</em> bytes, or <em class="arg">NULL</em> if out of memory. This function is meant for use in run-time systems for best performance and does not check if <em class="arg">size</em> was indeed small – use with care! </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -672,13 +672,13 @@ Functions</h2></td></tr>
|
|||
<tr><td class="paramname">start</td><td>Start of the memory area </td></tr>
|
||||
<tr><td class="paramname">size</td><td>The size of the memory area. </td></tr>
|
||||
<tr><td class="paramname">is_committed</td><td>Is the area already committed? </td></tr>
|
||||
<tr><td class="paramname">is_large</td><td>Does it consist of large OS pages? Set this to <em>true</em> as well for memory that should not be decommitted or protected (like rdma etc.) </td></tr>
|
||||
<tr><td class="paramname">is_large</td><td>Does it consist of large OS pages? Set this to <em class="arg">true</em> as well for memory that should not be decommitted or protected (like rdma etc.) </td></tr>
|
||||
<tr><td class="paramname">is_zero</td><td>Does the area consists of zero's? </td></tr>
|
||||
<tr><td class="paramname">numa_node</td><td>Possible associated numa node or <code>-1</code>. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em>true</em> if successful, and <em>false</em> on error. </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em class="arg">true</em> if successful, and <em class="arg">false</em> on error. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -812,7 +812,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>The <em>current_rss</em> is precise on Windows and MacOSX; other systems estimate this using <em>current_commit</em>. The <em>commit</em> is precise on Windows but estimated on other systems as the amount of read/write accessible memory reserved by mimalloc. </p>
|
||||
<p>The <em class="arg">current_rss</em> is precise on Windows and MacOSX; other systems estimate this using <em class="arg">current_commit</em>. The <em class="arg">commit</em> is precise on Windows but estimated on other systems as the amount of read/write accessible memory reserved by mimalloc. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -838,12 +838,12 @@ Functions</h2></td></tr>
|
|||
<p>Register a deferred free function. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">deferred_free</td><td>Address of a deferred free-ing function or <em>NULL</em> to unregister. </td></tr>
|
||||
<tr><td class="paramname">deferred_free</td><td>Address of a deferred free-ing function or <em class="arg">NULL</em> to unregister. </td></tr>
|
||||
<tr><td class="paramname">arg</td><td>Argument that will be passed on to the deferred free function.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Some runtime systems use deferred free-ing, for example when using reference counting to limit the worst case free time. Such systems can register (re-entrant) deferred free function to free more memory on demand. When the <em>force</em> parameter is <em>true</em> all possible memory should be freed. The per-thread <em>heartbeat</em> parameter is monotonically increasing and guaranteed to be deterministic if the program allocates deterministically. The <em>deferred_free</em> function is guaranteed to be called deterministically after some number of allocations (regardless of freeing or available free memory). At most one <em>deferred_free</em> function can be active. </p>
|
||||
<p>Some runtime systems use deferred free-ing, for example when using reference counting to limit the worst case free time. Such systems can register (re-entrant) deferred free function to free more memory on demand. When the <em class="arg">force</em> parameter is <em class="arg">true</em> all possible memory should be freed. The per-thread <em class="arg">heartbeat</em> parameter is monotonically increasing and guaranteed to be deterministic if the program allocates deterministically. The <em class="arg">deferred_free</em> function is guaranteed to be called deterministically after some number of allocations (regardless of freeing or available free memory). At most one <em class="arg">deferred_free</em> function can be active. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -869,17 +869,17 @@ Functions</h2></td></tr>
|
|||
<p>Register an error callback function. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">errfun</td><td>The error function that is called on an error (use <em>NULL</em> for default) </td></tr>
|
||||
<tr><td class="paramname">errfun</td><td>The error function that is called on an error (use <em class="arg">NULL</em> for default) </td></tr>
|
||||
<tr><td class="paramname">arg</td><td>Extra argument that will be passed on to the error function.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>The <em>errfun</em> function is called on an error in mimalloc after emitting an error message (through the output function). It as always legal to just return from the <em>errfun</em> function in which case allocation functions generally return <em>NULL</em> or ignore the condition. The default function only calls abort() when compiled in secure mode with an <em>EFAULT</em> error. The possible error codes are:</p><ul>
|
||||
<li><em>EAGAIN:</em> Double free was detected (only in debug and secure mode).</li>
|
||||
<li><em>EFAULT:</em> Corrupted free list or meta-data was detected (only in debug and secure mode).</li>
|
||||
<li><em>ENOMEM:</em> Not enough memory available to satisfy the request.</li>
|
||||
<li><em>EOVERFLOW:</em> Too large a request, for example in <a class="el" href="group__malloc.html#ga6686568014b54d1e6c7ac64a076e4f56" title="Allocate zero-initialized count elements of size bytes.">mi_calloc()</a>, the <em>count</em> and <em>size</em> parameters are too large.</li>
|
||||
<li><em>EINVAL:</em> Trying to free or re-allocate an invalid pointer. </li>
|
||||
<p>The <em class="arg">errfun</em> function is called on an error in mimalloc after emitting an error message (through the output function). It as always legal to just return from the <em class="arg">errfun</em> function in which case allocation functions generally return <em class="arg">NULL</em> or ignore the condition. The default function only calls abort() when compiled in secure mode with an <em class="arg">EFAULT</em> error. The possible error codes are:</p><ul>
|
||||
<li><em class="arg">EAGAIN:</em> Double free was detected (only in debug and secure mode).</li>
|
||||
<li><em class="arg">EFAULT:</em> Corrupted free list or meta-data was detected (only in debug and secure mode).</li>
|
||||
<li><em class="arg">ENOMEM:</em> Not enough memory available to satisfy the request.</li>
|
||||
<li><em class="arg">EOVERFLOW:</em> Too large a request, for example in <a class="el" href="group__malloc.html#ga6686568014b54d1e6c7ac64a076e4f56" title="Allocate zero-initialized count elements of size bytes.">mi_calloc()</a>, the <em class="arg">count</em> and <em class="arg">size</em> parameters are too large.</li>
|
||||
<li><em class="arg">EINVAL:</em> Trying to free or re-allocate an invalid pointer. </li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -939,7 +939,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Reserve <em>pages</em> of huge OS pages (1GiB) at a specific <em>numa_node</em>, but stops after at most <code>timeout_msecs</code> seconds. </p>
|
||||
<p>Reserve <em class="arg">pages</em> of huge OS pages (1GiB) at a specific <em class="arg">numa_node</em>, but stops after at most <code>timeout_msecs</code> seconds. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">pages</td><td>The number of 1GiB pages to reserve. </td></tr>
|
||||
|
@ -948,8 +948,8 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 if successful, <em>ENOMEM</em> if running out of memory, or <em>ETIMEDOUT</em> if timed out.</dd></dl>
|
||||
<p>The reserved memory is used by mimalloc to satisfy allocations. May quit before <em>timeout_msecs</em> are expired if it estimates it will take more than 1.5 times <em>timeout_msecs</em>. The time limit is needed because on some operating systems it can take a long time to reserve contiguous memory if the physical memory is fragmented. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 if successful, <em class="arg">ENOMEM</em> if running out of memory, or <em class="arg">ETIMEDOUT</em> if timed out.</dd></dl>
|
||||
<p>The reserved memory is used by mimalloc to satisfy allocations. May quit before <em class="arg">timeout_msecs</em> are expired if it estimates it will take more than 1.5 times <em class="arg">timeout_msecs</em>. The time limit is needed because on some operating systems it can take a long time to reserve contiguous memory if the physical memory is fragmented. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -998,7 +998,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 if successful, <em>ENOMEM</em> if running out of memory, or <em>ETIMEDOUT</em> if timed out. </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 if successful, <em class="arg">ENOMEM</em> if running out of memory, or <em class="arg">ETIMEDOUT</em> if timed out. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1026,7 +1026,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Reserve <em>pages</em> of huge OS pages (1GiB) evenly divided over <em>numa_nodes</em> nodes, but stops after at most <code>timeout_msecs</code> seconds. </p>
|
||||
<p>Reserve <em class="arg">pages</em> of huge OS pages (1GiB) evenly divided over <em class="arg">numa_nodes</em> nodes, but stops after at most <code>timeout_msecs</code> seconds. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">pages</td><td>The number of 1GiB pages to reserve. </td></tr>
|
||||
|
@ -1035,8 +1035,8 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 if successful, <em>ENOMEM</em> if running out of memory, or <em>ETIMEDOUT</em> if timed out.</dd></dl>
|
||||
<p>The reserved memory is used by mimalloc to satisfy allocations. May quit before <em>timeout_msecs</em> are expired if it estimates it will take more than 1.5 times <em>timeout_msecs</em>. The time limit is needed because on some operating systems it can take a long time to reserve contiguous memory if the physical memory is fragmented. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 if successful, <em class="arg">ENOMEM</em> if running out of memory, or <em class="arg">ETIMEDOUT</em> if timed out.</dd></dl>
|
||||
<p>The reserved memory is used by mimalloc to satisfy allocations. May quit before <em class="arg">timeout_msecs</em> are expired if it estimates it will take more than 1.5 times <em class="arg">timeout_msecs</em>. The time limit is needed because on some operating systems it can take a long time to reserve contiguous memory if the physical memory is fragmented. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1073,7 +1073,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em>0</em> if successful, and an error code otherwise (e.g. <code>ENOMEM</code>). </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><em class="arg">0</em> if successful, and an error code otherwise (e.g. <code>ENOMEM</code>). </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1193,8 +1193,8 @@ Functions</h2></td></tr>
|
|||
<p>Print the main statistics. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">out</td><td>An output function or <em>NULL</em> for the default. </td></tr>
|
||||
<tr><td class="paramname">arg</td><td>Optional argument passed to <em>out</em> (if not <em>NULL</em>)</td></tr>
|
||||
<tr><td class="paramname">out</td><td>An output function or <em class="arg">NULL</em> for the default. </td></tr>
|
||||
<tr><td class="paramname">arg</td><td>Optional argument passed to <em class="arg">out</em> (if not <em class="arg">NULL</em>)</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -1367,8 +1367,8 @@ Functions</h2></td></tr>
|
|||
<p>Print out heap statistics for this thread. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">out</td><td>An output function or <em>NULL</em> for the default. </td></tr>
|
||||
<tr><td class="paramname">arg</td><td>Optional argument passed to <em>out</em> (if not <em>NULL</em>)</td></tr>
|
||||
<tr><td class="paramname">out</td><td>An output function or <em class="arg">NULL</em> for the default. </td></tr>
|
||||
<tr><td class="paramname">arg</td><td>Optional argument passed to <em class="arg">out</em> (if not <em class="arg">NULL</em>)</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -1394,12 +1394,12 @@ Functions</h2></td></tr>
|
|||
<p>Return the available bytes in a memory block. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">p</td><td>Pointer to previously allocated memory (or <em>NULL</em>) </td></tr>
|
||||
<tr><td class="paramname">p</td><td>Pointer to previously allocated memory (or <em class="arg">NULL</em>) </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Returns the available bytes in the memory block, or 0 if <em>p</em> was <em>NULL</em>.</dd></dl>
|
||||
<p>The returned size can be used to call <em>mi_expand</em> successfully. The returned size is always at least equal to the allocated size of <em>p</em>.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Returns the available bytes in the memory block, or 0 if <em class="arg">p</em> was <em class="arg">NULL</em>.</dd></dl>
|
||||
<p>The returned size can be used to call <em class="arg">mi_expand</em> successfully. The returned size is always at least equal to the allocated size of <em class="arg">p</em>.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/msize?view=vs-2017">_msize</a> (Windows) </dd>
|
||||
<dd>
|
||||
<a href="http://man7.org/linux/man-pages/man3/malloc_usable_size.3.html">malloc_usable_size</a> (Linux) </dd>
|
||||
|
@ -1430,7 +1430,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a pointer to newly allocated zero-initialized memory of at least <em>size</em> bytes, or <em>NULL</em> if out of memory. This function is meant for use in run-time systems for best performance and does not check if <em>size</em> was indeed small – use with care! </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a pointer to newly allocated zero-initialized memory of at least <em class="arg">size</em> bytes, or <em class="arg">NULL</em> if out of memory. This function is meant for use in run-time systems for best performance and does not check if <em class="arg">size</em> was indeed small – use with care! </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1439,7 +1439,7 @@ Functions</h2></td></tr>
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Heap Allocation</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -110,6 +110,9 @@ $(function(){initNavTree('group__heap.html',''); initResizable(true); });
|
|||
<div class="headertitle"><div class="title">Heap Allocation</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>First-class heaps that can be destroyed in one go.
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
|
@ -150,19 +153,19 @@ Functions</h2></td></tr>
|
|||
<tr class="memdesc:gabebc796399619d964d8db77aa835e8c1"><td class="mdescLeft"> </td><td class="mdescRight">Allocate zero-initialized in a specific heap. <br /></td></tr>
|
||||
<tr class="separator:gabebc796399619d964d8db77aa835e8c1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac0098aaf231d3e9586c73136d5df95da" id="r_gac0098aaf231d3e9586c73136d5df95da"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gac0098aaf231d3e9586c73136d5df95da">mi_heap_calloc</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t count, size_t size)</td></tr>
|
||||
<tr class="memdesc:gac0098aaf231d3e9586c73136d5df95da"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>count</em> zero-initialized elements in a specific heap. <br /></td></tr>
|
||||
<tr class="memdesc:gac0098aaf231d3e9586c73136d5df95da"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em class="arg">count</em> zero-initialized elements in a specific heap. <br /></td></tr>
|
||||
<tr class="separator:gac0098aaf231d3e9586c73136d5df95da"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab0f755c0b21c387fe8e9024200faa372" id="r_gab0f755c0b21c387fe8e9024200faa372"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gab0f755c0b21c387fe8e9024200faa372">mi_heap_mallocn</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, size_t count, size_t size)</td></tr>
|
||||
<tr class="memdesc:gab0f755c0b21c387fe8e9024200faa372"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>count</em> elements in a specific heap. <br /></td></tr>
|
||||
<tr class="memdesc:gab0f755c0b21c387fe8e9024200faa372"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em class="arg">count</em> elements in a specific heap. <br /></td></tr>
|
||||
<tr class="separator:gab0f755c0b21c387fe8e9024200faa372"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5754e09ccc51dd6bc73885bb6ea21b7a" id="r_ga5754e09ccc51dd6bc73885bb6ea21b7a"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5754e09ccc51dd6bc73885bb6ea21b7a">mi_heap_strdup</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, const char *s)</td></tr>
|
||||
<tr class="memdesc:ga5754e09ccc51dd6bc73885bb6ea21b7a"><td class="mdescLeft"> </td><td class="mdescRight">Duplicate a string in a specific heap. <br /></td></tr>
|
||||
<tr class="separator:ga5754e09ccc51dd6bc73885bb6ea21b7a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad224df78f1fbee942df8adf023e12cf3" id="r_gad224df78f1fbee942df8adf023e12cf3"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gad224df78f1fbee942df8adf023e12cf3">mi_heap_strndup</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, const char *s, size_t n)</td></tr>
|
||||
<tr class="memdesc:gad224df78f1fbee942df8adf023e12cf3"><td class="mdescLeft"> </td><td class="mdescRight">Duplicate a string of at most length <em>n</em> in a specific heap. <br /></td></tr>
|
||||
<tr class="memdesc:gad224df78f1fbee942df8adf023e12cf3"><td class="mdescLeft"> </td><td class="mdescRight">Duplicate a string of at most length <em class="arg">n</em> in a specific heap. <br /></td></tr>
|
||||
<tr class="separator:gad224df78f1fbee942df8adf023e12cf3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga55545a3ec6da29c5b4f62e540ecac1e2" id="r_ga55545a3ec6da29c5b4f62e540ecac1e2"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga55545a3ec6da29c5b4f62e540ecac1e2">mi_heap_realpath</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, const char *fname, char *resolved_name)</td></tr>
|
||||
<tr class="memdesc:ga55545a3ec6da29c5b4f62e540ecac1e2"><td class="mdescLeft"> </td><td class="mdescRight">Resolve a file path name using a specific <em>heap</em> to allocate the result. <br /></td></tr>
|
||||
<tr class="memdesc:ga55545a3ec6da29c5b4f62e540ecac1e2"><td class="mdescLeft"> </td><td class="mdescRight">Resolve a file path name using a specific <em class="arg">heap</em> to allocate the result. <br /></td></tr>
|
||||
<tr class="separator:ga55545a3ec6da29c5b4f62e540ecac1e2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac5252d6a2e510bd349e4fcb452e6a93a" id="r_gac5252d6a2e510bd349e4fcb452e6a93a"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gac5252d6a2e510bd349e4fcb452e6a93a">mi_heap_realloc</a> (<a class="el" href="#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a> *heap, void *p, size_t newsize)</td></tr>
|
||||
<tr class="separator:gac5252d6a2e510bd349e4fcb452e6a93a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
|
@ -232,7 +235,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate <em>count</em> zero-initialized elements in a specific heap. </p>
|
||||
<p>Allocate <em class="arg">count</em> zero-initialized elements in a specific heap. </p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#ga6686568014b54d1e6c7ac64a076e4f56" title="Allocate zero-initialized count elements of size bytes.">mi_calloc()</a> </dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -344,7 +347,7 @@ Functions</h2></td></tr>
|
|||
|
||||
<p>Delete a previously allocated heap. </p>
|
||||
<p>This will release resources and migrate any still allocated blocks in this heap (efficiently) to the default heap.</p>
|
||||
<p>If <em>heap</em> is the default heap, the default heap is set to the backing heap. </p>
|
||||
<p>If <em class="arg">heap</em> is the default heap, the default heap is set to the backing heap. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -365,7 +368,7 @@ Functions</h2></td></tr>
|
|||
|
||||
<p>Destroy a heap, freeing all its still allocated blocks. </p>
|
||||
<p>Use with care as this will free all blocks still allocated in the heap. However, this can be a very efficient way to free all heap memory in one go.</p>
|
||||
<p>If <em>heap</em> is the default heap, the default heap is set to the backing heap. </p>
|
||||
<p>If <em class="arg">heap</em> is the default heap, the default heap is set to the backing heap. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -510,7 +513,7 @@ Functions</h2></td></tr>
|
|||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate a small object in a specific heap. </p>
|
||||
<p><em>size</em> must be smaller or equal to <a class="el" href="group__extended.html#ga1ea64283508718d9d645c38efc2f4305" title="Maximum size allowed for small allocations in mi_malloc_small and mi_zalloc_small (usually 128*sizeof...">MI_SMALL_SIZE_MAX()</a>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#gae1dd97b542420c87ae085e822b1229e8" title="Allocate size bytes.">mi_malloc()</a> </dd></dl>
|
||||
<p><em class="arg">size</em> must be smaller or equal to <a class="el" href="group__extended.html#ga1ea64283508718d9d645c38efc2f4305" title="Maximum size allowed for small allocations in mi_malloc_small and mi_zalloc_small (usually 128*sizeof...">MI_SMALL_SIZE_MAX()</a>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#gae1dd97b542420c87ae085e822b1229e8" title="Allocate size bytes.">mi_malloc()</a> </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -538,7 +541,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate <em>count</em> elements in a specific heap. </p>
|
||||
<p>Allocate <em class="arg">count</em> elements in a specific heap. </p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#ga61f46bade3db76ca24aaafedc40de7b6" title="Allocate count elements of size bytes.">mi_mallocn()</a> </dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -736,7 +739,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Resolve a file path name using a specific <em>heap</em> to allocate the result. </p>
|
||||
<p>Resolve a file path name using a specific <em class="arg">heap</em> to allocate the result. </p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#ga94c3afcc086e85d75a57e9f76b9b71dd" title="Resolve a file path name.">mi_realpath()</a> </dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -815,7 +818,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Duplicate a string of at most length <em>n</em> in a specific heap. </p>
|
||||
<p>Duplicate a string of at most length <em class="arg">n</em> in a specific heap. </p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#ga486d0d26b3b3794f6d1cdb41a9aed92d" title="Allocate and duplicate a string up to n bytes.">mi_strndup()</a> </dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -906,7 +909,7 @@ Functions</h2></td></tr>
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Basic Allocation</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -119,37 +119,37 @@ Functions</h2></td></tr>
|
|||
<tr class="memdesc:gaf2c7b89c327d1f60f59e68b9ea644d95"><td class="mdescLeft"> </td><td class="mdescRight">Free previously allocated memory. <br /></td></tr>
|
||||
<tr class="separator:gaf2c7b89c327d1f60f59e68b9ea644d95"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae1dd97b542420c87ae085e822b1229e8" id="r_gae1dd97b542420c87ae085e822b1229e8"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gae1dd97b542420c87ae085e822b1229e8">mi_malloc</a> (size_t size)</td></tr>
|
||||
<tr class="memdesc:gae1dd97b542420c87ae085e822b1229e8"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>size</em> bytes. <br /></td></tr>
|
||||
<tr class="memdesc:gae1dd97b542420c87ae085e822b1229e8"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em class="arg">size</em> bytes. <br /></td></tr>
|
||||
<tr class="separator:gae1dd97b542420c87ae085e822b1229e8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae6e38c4403247a7b40d80419e093bfb8" id="r_gae6e38c4403247a7b40d80419e093bfb8"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#gae6e38c4403247a7b40d80419e093bfb8">mi_zalloc</a> (size_t size)</td></tr>
|
||||
<tr class="memdesc:gae6e38c4403247a7b40d80419e093bfb8"><td class="mdescLeft"> </td><td class="mdescRight">Allocate zero-initialized <code>size</code> bytes. <br /></td></tr>
|
||||
<tr class="separator:gae6e38c4403247a7b40d80419e093bfb8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6686568014b54d1e6c7ac64a076e4f56" id="r_ga6686568014b54d1e6c7ac64a076e4f56"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga6686568014b54d1e6c7ac64a076e4f56">mi_calloc</a> (size_t count, size_t size)</td></tr>
|
||||
<tr class="memdesc:ga6686568014b54d1e6c7ac64a076e4f56"><td class="mdescLeft"> </td><td class="mdescRight">Allocate zero-initialized <em>count</em> elements of <em>size</em> bytes. <br /></td></tr>
|
||||
<tr class="memdesc:ga6686568014b54d1e6c7ac64a076e4f56"><td class="mdescLeft"> </td><td class="mdescRight">Allocate zero-initialized <em class="arg">count</em> elements of <em class="arg">size</em> bytes. <br /></td></tr>
|
||||
<tr class="separator:ga6686568014b54d1e6c7ac64a076e4f56"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0621af6a5e3aa384e6a1b548958bf583" id="r_ga0621af6a5e3aa384e6a1b548958bf583"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga0621af6a5e3aa384e6a1b548958bf583">mi_realloc</a> (void *p, size_t newsize)</td></tr>
|
||||
<tr class="memdesc:ga0621af6a5e3aa384e6a1b548958bf583"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate memory to <em>newsize</em> bytes. <br /></td></tr>
|
||||
<tr class="memdesc:ga0621af6a5e3aa384e6a1b548958bf583"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate memory to <em class="arg">newsize</em> bytes. <br /></td></tr>
|
||||
<tr class="separator:ga0621af6a5e3aa384e6a1b548958bf583"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga23a0fbb452b5dce8e31fab1a1958cacc" id="r_ga23a0fbb452b5dce8e31fab1a1958cacc"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga23a0fbb452b5dce8e31fab1a1958cacc">mi_recalloc</a> (void *p, size_t count, size_t size)</td></tr>
|
||||
<tr class="memdesc:ga23a0fbb452b5dce8e31fab1a1958cacc"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate memory to <em>count</em> elements of <em>size</em> bytes, with extra memory initialized to zero. <br /></td></tr>
|
||||
<tr class="memdesc:ga23a0fbb452b5dce8e31fab1a1958cacc"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate memory to <em class="arg">count</em> elements of <em class="arg">size</em> bytes, with extra memory initialized to zero. <br /></td></tr>
|
||||
<tr class="separator:ga23a0fbb452b5dce8e31fab1a1958cacc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga19299856216cfbb08e2628593654dfb0" id="r_ga19299856216cfbb08e2628593654dfb0"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga19299856216cfbb08e2628593654dfb0">mi_expand</a> (void *p, size_t newsize)</td></tr>
|
||||
<tr class="memdesc:ga19299856216cfbb08e2628593654dfb0"><td class="mdescLeft"> </td><td class="mdescRight">Try to re-allocate memory to <em>newsize</em> bytes <em>in place</em>. <br /></td></tr>
|
||||
<tr class="memdesc:ga19299856216cfbb08e2628593654dfb0"><td class="mdescLeft"> </td><td class="mdescRight">Try to re-allocate memory to <em class="arg">newsize</em> bytes <em>in place</em>. <br /></td></tr>
|
||||
<tr class="separator:ga19299856216cfbb08e2628593654dfb0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga61f46bade3db76ca24aaafedc40de7b6" id="r_ga61f46bade3db76ca24aaafedc40de7b6"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga61f46bade3db76ca24aaafedc40de7b6">mi_mallocn</a> (size_t count, size_t size)</td></tr>
|
||||
<tr class="memdesc:ga61f46bade3db76ca24aaafedc40de7b6"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>count</em> elements of <em>size</em> bytes. <br /></td></tr>
|
||||
<tr class="memdesc:ga61f46bade3db76ca24aaafedc40de7b6"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em class="arg">count</em> elements of <em class="arg">size</em> bytes. <br /></td></tr>
|
||||
<tr class="separator:ga61f46bade3db76ca24aaafedc40de7b6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga8bddfb4a1270a0854bbcf44cb3980467" id="r_ga8bddfb4a1270a0854bbcf44cb3980467"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga8bddfb4a1270a0854bbcf44cb3980467">mi_reallocn</a> (void *p, size_t count, size_t size)</td></tr>
|
||||
<tr class="memdesc:ga8bddfb4a1270a0854bbcf44cb3980467"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate memory to <em>count</em> elements of <em>size</em> bytes. <br /></td></tr>
|
||||
<tr class="memdesc:ga8bddfb4a1270a0854bbcf44cb3980467"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate memory to <em class="arg">count</em> elements of <em class="arg">size</em> bytes. <br /></td></tr>
|
||||
<tr class="separator:ga8bddfb4a1270a0854bbcf44cb3980467"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga4dc3a4067037b151a64629fe8a332641" id="r_ga4dc3a4067037b151a64629fe8a332641"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga4dc3a4067037b151a64629fe8a332641">mi_reallocf</a> (void *p, size_t newsize)</td></tr>
|
||||
<tr class="memdesc:ga4dc3a4067037b151a64629fe8a332641"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate memory to <em>newsize</em> bytes,. <br /></td></tr>
|
||||
<tr class="memdesc:ga4dc3a4067037b151a64629fe8a332641"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate memory to <em class="arg">newsize</em> bytes,. <br /></td></tr>
|
||||
<tr class="separator:ga4dc3a4067037b151a64629fe8a332641"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga245ac90ebc2cfdd17de599e5fea59889" id="r_ga245ac90ebc2cfdd17de599e5fea59889"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga245ac90ebc2cfdd17de599e5fea59889">mi_strdup</a> (const char *s)</td></tr>
|
||||
<tr class="memdesc:ga245ac90ebc2cfdd17de599e5fea59889"><td class="mdescLeft"> </td><td class="mdescRight">Allocate and duplicate a string. <br /></td></tr>
|
||||
<tr class="separator:ga245ac90ebc2cfdd17de599e5fea59889"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga486d0d26b3b3794f6d1cdb41a9aed92d" id="r_ga486d0d26b3b3794f6d1cdb41a9aed92d"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga486d0d26b3b3794f6d1cdb41a9aed92d">mi_strndup</a> (const char *s, size_t n)</td></tr>
|
||||
<tr class="memdesc:ga486d0d26b3b3794f6d1cdb41a9aed92d"><td class="mdescLeft"> </td><td class="mdescRight">Allocate and duplicate a string up to <em>n</em> bytes. <br /></td></tr>
|
||||
<tr class="memdesc:ga486d0d26b3b3794f6d1cdb41a9aed92d"><td class="mdescLeft"> </td><td class="mdescRight">Allocate and duplicate a string up to <em class="arg">n</em> bytes. <br /></td></tr>
|
||||
<tr class="separator:ga486d0d26b3b3794f6d1cdb41a9aed92d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga94c3afcc086e85d75a57e9f76b9b71dd" id="r_ga94c3afcc086e85d75a57e9f76b9b71dd"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga94c3afcc086e85d75a57e9f76b9b71dd">mi_realpath</a> (const char *fname, char *resolved_name)</td></tr>
|
||||
<tr class="memdesc:ga94c3afcc086e85d75a57e9f76b9b71dd"><td class="mdescLeft"> </td><td class="mdescRight">Resolve a file path name. <br /></td></tr>
|
||||
|
@ -177,7 +177,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate zero-initialized <em>count</em> elements of <em>size</em> bytes. </p>
|
||||
<p>Allocate zero-initialized <em class="arg">count</em> elements of <em class="arg">size</em> bytes. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">count</td><td>number of elements. </td></tr>
|
||||
|
@ -185,8 +185,8 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory of <em>size*<em>count</em> bytes</em>, or <em>NULL</em> if either out of memory or when <code>count*size</code> overflows.</dd></dl>
|
||||
<p>Returns a unique pointer if called with either <em>size</em> or <em>count</em> of 0. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="#gae6e38c4403247a7b40d80419e093bfb8" title="Allocate zero-initialized size bytes.">mi_zalloc()</a> </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory of <em class="arg">size*<em class="arg">count</em> bytes</em>, or <em class="arg">NULL</em> if either out of memory or when <code>count*size</code> overflows.</dd></dl>
|
||||
<p>Returns a unique pointer if called with either <em class="arg">size</em> or <em class="arg">count</em> of 0. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="#gae6e38c4403247a7b40d80419e093bfb8" title="Allocate zero-initialized size bytes.">mi_zalloc()</a> </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -209,15 +209,15 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Try to re-allocate memory to <em>newsize</em> bytes <em>in place</em>. </p>
|
||||
<p>Try to re-allocate memory to <em class="arg">newsize</em> bytes <em>in place</em>. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">p</td><td>pointer to previously allocated memory (or <em>NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">p</td><td>pointer to previously allocated memory (or <em class="arg">NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">newsize</td><td>the new required size in bytes. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the re-allocated memory of <em>newsize</em> bytes (always equal to <em>p</em>), or <em>NULL</em> if either out of memory or if the memory could not be expanded in place. If <em>NULL</em> is returned, the pointer <em>p</em> is not freed. Otherwise the original pointer is returned as the reallocated result since it fits in-place with the new size. If <em>newsize</em> is larger than the original <em>size</em> allocated for <em>p</em>, the bytes after <em>size</em> are uninitialized. </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the re-allocated memory of <em class="arg">newsize</em> bytes (always equal to <em class="arg">p</em>), or <em class="arg">NULL</em> if either out of memory or if the memory could not be expanded in place. If <em class="arg">NULL</em> is returned, the pointer <em class="arg">p</em> is not freed. Otherwise the original pointer is returned as the reallocated result since it fits in-place with the new size. If <em class="arg">newsize</em> is larger than the original <em class="arg">size</em> allocated for <em class="arg">p</em>, the bytes after <em class="arg">size</em> are uninitialized. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -237,9 +237,9 @@ Functions</h2></td></tr>
|
|||
</div><div class="memdoc">
|
||||
|
||||
<p>Free previously allocated memory. </p>
|
||||
<p>The pointer <code>p</code> must have been allocated before (or be <em>NULL</em>). </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>The pointer <code>p</code> must have been allocated before (or be <em class="arg">NULL</em>). </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">p</td><td>pointer to free, or <em>NULL</em>. </td></tr>
|
||||
<tr><td class="paramname">p</td><td>pointer to free, or <em class="arg">NULL</em>. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -261,14 +261,14 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate <em>size</em> bytes. </p>
|
||||
<p>Allocate <em class="arg">size</em> bytes. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">size</td><td>number of bytes to allocate. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory or <em>NULL</em> if out of memory. Returns a unique pointer if called with <em>size</em> 0. </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated memory or <em class="arg">NULL</em> if out of memory. Returns a unique pointer if called with <em class="arg">size</em> 0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -291,7 +291,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate <em>count</em> elements of <em>size</em> bytes. </p>
|
||||
<p>Allocate <em class="arg">count</em> elements of <em class="arg">size</em> bytes. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">count</td><td>The number of elements. </td></tr>
|
||||
|
@ -299,7 +299,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A pointer to a block of <em>count</em> * <em>size</em> bytes, or <em>NULL</em> if out of memory or if <em>count</em> * <em>size</em> overflows.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A pointer to a block of <em class="arg">count</em> * <em class="arg">size</em> bytes, or <em class="arg">NULL</em> if out of memory or if <em class="arg">count</em> * <em class="arg">size</em> overflows.</dd></dl>
|
||||
<p>If there is no overflow, it behaves exactly like <code>mi_malloc(count*size)</code>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="#ga6686568014b54d1e6c7ac64a076e4f56" title="Allocate zero-initialized count elements of size bytes.">mi_calloc()</a> </dd>
|
||||
<dd>
|
||||
mi_zallocn() </dd></dl>
|
||||
|
@ -325,15 +325,15 @@ mi_zallocn() </dd></dl>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Re-allocate memory to <em>newsize</em> bytes. </p>
|
||||
<p>Re-allocate memory to <em class="arg">newsize</em> bytes. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">p</td><td>pointer to previously allocated memory (or <em>NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">p</td><td>pointer to previously allocated memory (or <em class="arg">NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">newsize</td><td>the new required size in bytes. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the re-allocated memory of <em>newsize</em> bytes, or <em>NULL</em> if out of memory. If <em>NULL</em> is returned, the pointer <em>p</em> is not freed. Otherwise the original pointer is either freed or returned as the reallocated result (in case it fits in-place with the new size). If the pointer <em>p</em> is <em>NULL</em>, it behaves as <em>mi_malloc</em>(<em>newsize</em>). If <em>newsize</em> is larger than the original <em>size</em> allocated for <em>p</em>, the bytes after <em>size</em> are uninitialized. </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the re-allocated memory of <em class="arg">newsize</em> bytes, or <em class="arg">NULL</em> if out of memory. If <em class="arg">NULL</em> is returned, the pointer <em class="arg">p</em> is not freed. Otherwise the original pointer is either freed or returned as the reallocated result (in case it fits in-place with the new size). If the pointer <em class="arg">p</em> is <em class="arg">NULL</em>, it behaves as <em class="arg">mi_malloc</em>(<em class="arg">newsize</em>). If <em class="arg">newsize</em> is larger than the original <em class="arg">size</em> allocated for <em class="arg">p</em>, the bytes after <em class="arg">size</em> are uninitialized. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -356,16 +356,16 @@ mi_zallocn() </dd></dl>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Re-allocate memory to <em>newsize</em> bytes,. </p>
|
||||
<p>Re-allocate memory to <em class="arg">newsize</em> bytes,. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">p</td><td>pointer to previously allocated memory (or <em>NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">p</td><td>pointer to previously allocated memory (or <em class="arg">NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">newsize</td><td>the new required size in bytes. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the re-allocated memory of <em>newsize</em> bytes, or <em>NULL</em> if out of memory.</dd></dl>
|
||||
<p>In contrast to <a class="el" href="#ga0621af6a5e3aa384e6a1b548958bf583" title="Re-allocate memory to newsize bytes.">mi_realloc()</a>, if <em>NULL</em> is returned, the original pointer <em>p</em> is freed (if it was not <em>NULL</em> itself). Otherwise the original pointer is either freed or returned as the reallocated result (in case it fits in-place with the new size). If the pointer <em>p</em> is <em>NULL</em>, it behaves as <em>mi_malloc</em>(<em>newsize</em>). If <em>newsize</em> is larger than the original <em>size</em> allocated for <em>p</em>, the bytes after <em>size</em> are uninitialized.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>pointer to the re-allocated memory of <em class="arg">newsize</em> bytes, or <em class="arg">NULL</em> if out of memory.</dd></dl>
|
||||
<p>In contrast to <a class="el" href="#ga0621af6a5e3aa384e6a1b548958bf583" title="Re-allocate memory to newsize bytes.">mi_realloc()</a>, if <em class="arg">NULL</em> is returned, the original pointer <em class="arg">p</em> is freed (if it was not <em class="arg">NULL</em> itself). Otherwise the original pointer is either freed or returned as the reallocated result (in case it fits in-place with the new size). If the pointer <em class="arg">p</em> is <em class="arg">NULL</em>, it behaves as <em class="arg">mi_malloc</em>(<em class="arg">newsize</em>). If <em class="arg">newsize</em> is larger than the original <em class="arg">size</em> allocated for <em class="arg">p</em>, the bytes after <em class="arg">size</em> are uninitialized.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a href="https://www.freebsd.org/cgi/man.cgi?query=reallocf">reallocf</a> (on BSD) </dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -394,16 +394,16 @@ mi_zallocn() </dd></dl>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Re-allocate memory to <em>count</em> elements of <em>size</em> bytes. </p>
|
||||
<p>Re-allocate memory to <em class="arg">count</em> elements of <em class="arg">size</em> bytes. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">p</td><td>Pointer to a previously allocated block (or <em>NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">p</td><td>Pointer to a previously allocated block (or <em class="arg">NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">count</td><td>The number of elements. </td></tr>
|
||||
<tr><td class="paramname">size</td><td>The size of each element. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A pointer to a re-allocated block of <em>count</em> * <em>size</em> bytes, or <em>NULL</em> if out of memory or if <em>count</em> * <em>size</em> overflows.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A pointer to a re-allocated block of <em class="arg">count</em> * <em class="arg">size</em> bytes, or <em class="arg">NULL</em> if out of memory or if <em class="arg">count</em> * <em class="arg">size</em> overflows.</dd></dl>
|
||||
<p>If there is no overflow, it behaves exactly like <code>mi_realloc(p,count*size)</code>. </p><dl class="section see"><dt>See also</dt><dd><a href="http://man.openbsd.org/reallocarray">reallocarray()</a> (on BSD) </dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -431,13 +431,13 @@ mi_zallocn() </dd></dl>
|
|||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">fname</td><td>File name. </td></tr>
|
||||
<tr><td class="paramname">resolved_name</td><td>Should be <em>NULL</em> (but can also point to a buffer of at least <em>PATH_MAX</em> bytes). </td></tr>
|
||||
<tr><td class="paramname">resolved_name</td><td>Should be <em class="arg">NULL</em> (but can also point to a buffer of at least <em class="arg">PATH_MAX</em> bytes). </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>If successful a pointer to the resolved absolute file name, or <em>NULL</em> on failure (with <em>errno</em> set to the error code).</dd></dl>
|
||||
<p>If <em>resolved_name</em> was <em>NULL</em>, the returned result should be freed with <a class="el" href="#gaf2c7b89c327d1f60f59e68b9ea644d95" title="Free previously allocated memory.">mi_free()</a>.</p>
|
||||
<p>Replacement for the standard <a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html">realpath()</a> such that <a class="el" href="#gaf2c7b89c327d1f60f59e68b9ea644d95" title="Free previously allocated memory.">mi_free()</a> can be used on the returned result (if <em>resolved_name</em> was <em>NULL</em>). </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>If successful a pointer to the resolved absolute file name, or <em class="arg">NULL</em> on failure (with <em class="arg">errno</em> set to the error code).</dd></dl>
|
||||
<p>If <em class="arg">resolved_name</em> was <em class="arg">NULL</em>, the returned result should be freed with <a class="el" href="#gaf2c7b89c327d1f60f59e68b9ea644d95" title="Free previously allocated memory.">mi_free()</a>.</p>
|
||||
<p>Replacement for the standard <a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html">realpath()</a> such that <a class="el" href="#gaf2c7b89c327d1f60f59e68b9ea644d95" title="Free previously allocated memory.">mi_free()</a> can be used on the returned result (if <em class="arg">resolved_name</em> was <em class="arg">NULL</em>). </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -465,16 +465,16 @@ mi_zallocn() </dd></dl>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Re-allocate memory to <em>count</em> elements of <em>size</em> bytes, with extra memory initialized to zero. </p>
|
||||
<p>Re-allocate memory to <em class="arg">count</em> elements of <em class="arg">size</em> bytes, with extra memory initialized to zero. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">p</td><td>Pointer to a previously allocated block (or <em>NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">p</td><td>Pointer to a previously allocated block (or <em class="arg">NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">count</td><td>The number of elements. </td></tr>
|
||||
<tr><td class="paramname">size</td><td>The size of each element. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A pointer to a re-allocated block of <em>count</em> * <em>size</em> bytes, or <em>NULL</em> if out of memory or if <em>count</em> * <em>size</em> overflows.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A pointer to a re-allocated block of <em class="arg">count</em> * <em class="arg">size</em> bytes, or <em class="arg">NULL</em> if out of memory or if <em class="arg">count</em> * <em class="arg">size</em> overflows.</dd></dl>
|
||||
<p>If there is no overflow, it behaves exactly like <code>mi_rezalloc(p,count*size)</code>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="#ga8bddfb4a1270a0854bbcf44cb3980467" title="Re-allocate memory to count elements of size bytes.">mi_reallocn()</a> </dd>
|
||||
<dd>
|
||||
<a href="http://man.openbsd.org/reallocarray">recallocarray()</a> (on BSD). </dd></dl>
|
||||
|
@ -499,11 +499,11 @@ mi_zallocn() </dd></dl>
|
|||
<p>Allocate and duplicate a string. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">s</td><td>string to duplicate (or <em>NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">s</td><td>string to duplicate (or <em class="arg">NULL</em>). </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a pointer to newly allocated memory initialized to string <em>s</em>, or <em>NULL</em> if either out of memory or if <em>s</em> is <em>NULL</em>.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a pointer to newly allocated memory initialized to string <em class="arg">s</em>, or <em class="arg">NULL</em> if either out of memory or if <em class="arg">s</em> is <em class="arg">NULL</em>.</dd></dl>
|
||||
<p>Replacement for the standard <a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/strdup.html">strdup()</a> such that <a class="el" href="#gaf2c7b89c327d1f60f59e68b9ea644d95" title="Free previously allocated memory.">mi_free()</a> can be used on the returned result. </p>
|
||||
|
||||
</div>
|
||||
|
@ -527,15 +527,15 @@ mi_zallocn() </dd></dl>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate and duplicate a string up to <em>n</em> bytes. </p>
|
||||
<p>Allocate and duplicate a string up to <em class="arg">n</em> bytes. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">s</td><td>string to duplicate (or <em>NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">s</td><td>string to duplicate (or <em class="arg">NULL</em>). </td></tr>
|
||||
<tr><td class="paramname">n</td><td>maximum number of bytes to copy (excluding the terminating zero). </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a pointer to newly allocated memory initialized to string <em>s</em> up to the first <em>n</em> bytes (and always zero terminated), or <em>NULL</em> if either out of memory or if <em>s</em> is <em>NULL</em>.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a pointer to newly allocated memory initialized to string <em class="arg">s</em> up to the first <em class="arg">n</em> bytes (and always zero terminated), or <em class="arg">NULL</em> if either out of memory or if <em class="arg">s</em> is <em class="arg">NULL</em>.</dd></dl>
|
||||
<p>Replacement for the standard <a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/strndup.html">strndup()</a> such that <a class="el" href="#gaf2c7b89c327d1f60f59e68b9ea644d95" title="Free previously allocated memory.">mi_free()</a> can be used on the returned result. </p>
|
||||
|
||||
</div>
|
||||
|
@ -562,7 +562,7 @@ mi_zallocn() </dd></dl>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Pointer to newly allocated zero initialized memory, or <em>NULL</em> if out of memory. </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Pointer to newly allocated zero initialized memory, or <em class="arg">NULL</em> if out of memory. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -571,7 +571,7 @@ mi_zallocn() </dd></dl>
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Runtime Options</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -110,6 +110,9 @@ $(function(){initNavTree('group__options.html',''); initResizable(true); });
|
|||
<div class="headertitle"><div class="title">Runtime Options</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Set runtime behavior.
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
|
||||
Enumerations</h2></td></tr>
|
||||
|
@ -457,7 +460,7 @@ Functions</h2></td></tr>
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Posix</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -109,6 +109,9 @@ $(function(){initNavTree('group__posix.html',''); initResizable(true); });
|
|||
<div class="headertitle"><div class="title">Posix</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p><code>mi_</code> prefixed implementations of various Posix, Unix, and C++ allocation functions.
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
|
@ -161,7 +164,8 @@ Functions</h2></td></tr>
|
|||
<tr class="separator:ga0d28d5cf61e6bfbb18c63092939fe5c9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<p><code>mi_</code> prefixed implementations of various Posix, Unix, and C++ allocation functions. Defined for convenience as all redirect to the regular mimalloc API. </p>
|
||||
<p><code>mi_</code> prefixed implementations of various Posix, Unix, and C++ allocation functions. </p>
|
||||
<p>Defined for convenience as all redirect to the regular mimalloc API. </p>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga66bcfeb4faedbb42b796bc680821ef84" name="ga66bcfeb4faedbb42b796bc680821ef84"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga66bcfeb4faedbb42b796bc680821ef84">◆ </a></span>mi__expand()</h2>
|
||||
|
@ -664,7 +668,7 @@ Functions</h2></td></tr>
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Typed Macros</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -109,45 +109,49 @@ $(function(){initNavTree('group__typed.html',''); initResizable(true); });
|
|||
<div class="headertitle"><div class="title">Typed Macros</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Typed allocation macros.
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:ga0619a62c5fd886f1016030abe91f0557" id="r_ga0619a62c5fd886f1016030abe91f0557"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga0619a62c5fd886f1016030abe91f0557">mi_malloc_tp</a>(tp)</td></tr>
|
||||
<tr class="memdesc:ga0619a62c5fd886f1016030abe91f0557"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a block of type <em>tp</em>. <br /></td></tr>
|
||||
<tr class="memdesc:ga0619a62c5fd886f1016030abe91f0557"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a block of type <em class="arg">tp</em>. <br /></td></tr>
|
||||
<tr class="separator:ga0619a62c5fd886f1016030abe91f0557"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac77a61bdaf680a803785fe307820b48c" id="r_gac77a61bdaf680a803785fe307820b48c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#gac77a61bdaf680a803785fe307820b48c">mi_zalloc_tp</a>(tp)</td></tr>
|
||||
<tr class="memdesc:gac77a61bdaf680a803785fe307820b48c"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a zero-initialized block of type <em>tp</em>. <br /></td></tr>
|
||||
<tr class="memdesc:gac77a61bdaf680a803785fe307820b48c"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a zero-initialized block of type <em class="arg">tp</em>. <br /></td></tr>
|
||||
<tr class="separator:gac77a61bdaf680a803785fe307820b48c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae80c47c9d4cab10961fff1a8ac98fc07" id="r_gae80c47c9d4cab10961fff1a8ac98fc07"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#gae80c47c9d4cab10961fff1a8ac98fc07">mi_calloc_tp</a>(tp, count)</td></tr>
|
||||
<tr class="memdesc:gae80c47c9d4cab10961fff1a8ac98fc07"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>count</em> zero-initialized blocks of type <em>tp</em>. <br /></td></tr>
|
||||
<tr class="memdesc:gae80c47c9d4cab10961fff1a8ac98fc07"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em class="arg">count</em> zero-initialized blocks of type <em class="arg">tp</em>. <br /></td></tr>
|
||||
<tr class="separator:gae80c47c9d4cab10961fff1a8ac98fc07"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae5cb6e0fafc9f23169c5622e077afe8b" id="r_gae5cb6e0fafc9f23169c5622e077afe8b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#gae5cb6e0fafc9f23169c5622e077afe8b">mi_mallocn_tp</a>(tp, count)</td></tr>
|
||||
<tr class="memdesc:gae5cb6e0fafc9f23169c5622e077afe8b"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>count</em> blocks of type <em>tp</em>. <br /></td></tr>
|
||||
<tr class="memdesc:gae5cb6e0fafc9f23169c5622e077afe8b"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em class="arg">count</em> blocks of type <em class="arg">tp</em>. <br /></td></tr>
|
||||
<tr class="separator:gae5cb6e0fafc9f23169c5622e077afe8b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1158b49a55dfa81f58a4426a7578f523" id="r_ga1158b49a55dfa81f58a4426a7578f523"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga1158b49a55dfa81f58a4426a7578f523">mi_reallocn_tp</a>(p, tp, count)</td></tr>
|
||||
<tr class="memdesc:ga1158b49a55dfa81f58a4426a7578f523"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate to <em>count</em> blocks of type <em>tp</em>. <br /></td></tr>
|
||||
<tr class="memdesc:ga1158b49a55dfa81f58a4426a7578f523"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate to <em class="arg">count</em> blocks of type <em class="arg">tp</em>. <br /></td></tr>
|
||||
<tr class="separator:ga1158b49a55dfa81f58a4426a7578f523"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga653bcb24ac495bc19940ecd6898f9cd7" id="r_ga653bcb24ac495bc19940ecd6898f9cd7"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga653bcb24ac495bc19940ecd6898f9cd7">mi_heap_malloc_tp</a>(hp, tp)</td></tr>
|
||||
<tr class="memdesc:ga653bcb24ac495bc19940ecd6898f9cd7"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a block of type <em>tp</em> in a heap <em>hp</em>. <br /></td></tr>
|
||||
<tr class="memdesc:ga653bcb24ac495bc19940ecd6898f9cd7"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a block of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. <br /></td></tr>
|
||||
<tr class="separator:ga653bcb24ac495bc19940ecd6898f9cd7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad6e87e86e994aa14416ae9b5d4c188fe" id="r_gad6e87e86e994aa14416ae9b5d4c188fe"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#gad6e87e86e994aa14416ae9b5d4c188fe">mi_heap_zalloc_tp</a>(hp, tp)</td></tr>
|
||||
<tr class="memdesc:gad6e87e86e994aa14416ae9b5d4c188fe"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a zero-initialized block of type <em>tp</em> in a heap <em>hp</em>. <br /></td></tr>
|
||||
<tr class="memdesc:gad6e87e86e994aa14416ae9b5d4c188fe"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a zero-initialized block of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. <br /></td></tr>
|
||||
<tr class="separator:gad6e87e86e994aa14416ae9b5d4c188fe"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga4e5d1f1707c90e5f55e023ac5f45fe74" id="r_ga4e5d1f1707c90e5f55e023ac5f45fe74"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga4e5d1f1707c90e5f55e023ac5f45fe74">mi_heap_calloc_tp</a>(hp, tp, count)</td></tr>
|
||||
<tr class="memdesc:ga4e5d1f1707c90e5f55e023ac5f45fe74"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>count</em> zero-initialized blocks of type <em>tp</em> in a heap <em>hp</em>. <br /></td></tr>
|
||||
<tr class="memdesc:ga4e5d1f1707c90e5f55e023ac5f45fe74"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em class="arg">count</em> zero-initialized blocks of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. <br /></td></tr>
|
||||
<tr class="separator:ga4e5d1f1707c90e5f55e023ac5f45fe74"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6b75cb9c4b9c647661d0924552dc6e83" id="r_ga6b75cb9c4b9c647661d0924552dc6e83"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga6b75cb9c4b9c647661d0924552dc6e83">mi_heap_mallocn_tp</a>(hp, tp, count)</td></tr>
|
||||
<tr class="memdesc:ga6b75cb9c4b9c647661d0924552dc6e83"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em>count</em> blocks of type <em>tp</em> in a heap <em>hp</em>. <br /></td></tr>
|
||||
<tr class="memdesc:ga6b75cb9c4b9c647661d0924552dc6e83"><td class="mdescLeft"> </td><td class="mdescRight">Allocate <em class="arg">count</em> blocks of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. <br /></td></tr>
|
||||
<tr class="separator:ga6b75cb9c4b9c647661d0924552dc6e83"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf213d5422ec35e7f6caad827c79bc948" id="r_gaf213d5422ec35e7f6caad827c79bc948"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#gaf213d5422ec35e7f6caad827c79bc948">mi_heap_reallocn_tp</a>(hp, p, tp, count)</td></tr>
|
||||
<tr class="memdesc:gaf213d5422ec35e7f6caad827c79bc948"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate to <em>count</em> blocks of type <em>tp</em> in a heap <em>hp</em>. <br /></td></tr>
|
||||
<tr class="memdesc:gaf213d5422ec35e7f6caad827c79bc948"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate to <em class="arg">count</em> blocks of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. <br /></td></tr>
|
||||
<tr class="separator:gaf213d5422ec35e7f6caad827c79bc948"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3e50a1600958fcaf1a7f3560c9174f9e" id="r_ga3e50a1600958fcaf1a7f3560c9174f9e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga3e50a1600958fcaf1a7f3560c9174f9e">mi_heap_recalloc_tp</a>(hp, p, tp, count)</td></tr>
|
||||
<tr class="memdesc:ga3e50a1600958fcaf1a7f3560c9174f9e"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate to <em>count</em> zero initialized blocks of type <em>tp</em> in a heap <em>hp</em>. <br /></td></tr>
|
||||
<tr class="memdesc:ga3e50a1600958fcaf1a7f3560c9174f9e"><td class="mdescLeft"> </td><td class="mdescRight">Re-allocate to <em class="arg">count</em> zero initialized blocks of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. <br /></td></tr>
|
||||
<tr class="separator:ga3e50a1600958fcaf1a7f3560c9174f9e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<p>Typed allocation macros. For example: </p><div class="fragment"><div class="line"><span class="keywordtype">int</span>* p = <a class="code hl_define" href="#ga0619a62c5fd886f1016030abe91f0557">mi_malloc_tp</a>(<span class="keywordtype">int</span>)</div>
|
||||
<p>Typed allocation macros. </p>
|
||||
<p>For example: </p><div class="fragment"><div class="line"><span class="keywordtype">int</span>* p = <a class="code hl_define" href="#ga0619a62c5fd886f1016030abe91f0557">mi_malloc_tp</a>(<span class="keywordtype">int</span>)</div>
|
||||
<div class="ttc" id="agroup__typed_html_ga0619a62c5fd886f1016030abe91f0557"><div class="ttname"><a href="#ga0619a62c5fd886f1016030abe91f0557">mi_malloc_tp</a></div><div class="ttdeci">#define mi_malloc_tp(tp)</div><div class="ttdoc">Allocate a block of type tp.</div><div class="ttdef"><b>Definition</b> mimalloc-doc.h:784</div></div>
|
||||
</div><!-- fragment --> <h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="gae80c47c9d4cab10961fff1a8ac98fc07" name="gae80c47c9d4cab10961fff1a8ac98fc07"></a>
|
||||
|
@ -169,7 +173,7 @@ Macros</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate <em>count</em> zero-initialized blocks of type <em>tp</em>. </p>
|
||||
<p>Allocate <em class="arg">count</em> zero-initialized blocks of type <em class="arg">tp</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -197,7 +201,7 @@ Macros</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate <em>count</em> zero-initialized blocks of type <em>tp</em> in a heap <em>hp</em>. </p>
|
||||
<p>Allocate <em class="arg">count</em> zero-initialized blocks of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -220,7 +224,7 @@ Macros</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate a block of type <em>tp</em> in a heap <em>hp</em>. </p>
|
||||
<p>Allocate a block of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -248,7 +252,7 @@ Macros</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate <em>count</em> blocks of type <em>tp</em> in a heap <em>hp</em>. </p>
|
||||
<p>Allocate <em class="arg">count</em> blocks of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -281,7 +285,7 @@ Macros</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Re-allocate to <em>count</em> blocks of type <em>tp</em> in a heap <em>hp</em>. </p>
|
||||
<p>Re-allocate to <em class="arg">count</em> blocks of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -314,7 +318,7 @@ Macros</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Re-allocate to <em>count</em> zero initialized blocks of type <em>tp</em> in a heap <em>hp</em>. </p>
|
||||
<p>Re-allocate to <em class="arg">count</em> zero initialized blocks of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -337,7 +341,7 @@ Macros</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate a zero-initialized block of type <em>tp</em> in a heap <em>hp</em>. </p>
|
||||
<p>Allocate a zero-initialized block of type <em class="arg">tp</em> in a heap <em class="arg">hp</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -356,14 +360,14 @@ Macros</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate a block of type <em>tp</em>. </p>
|
||||
<p>Allocate a block of type <em class="arg">tp</em>. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">tp</td><td>The type of the block to allocate. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A pointer to an object of type <em>tp</em>, or <em>NULL</em> if out of memory.</dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A pointer to an object of type <em class="arg">tp</em>, or <em class="arg">NULL</em> if out of memory.</dd></dl>
|
||||
<p><b>Example:</b> </p><div class="fragment"><div class="line"><span class="keywordtype">int</span>* p = <a class="code hl_define" href="#ga0619a62c5fd886f1016030abe91f0557">mi_malloc_tp</a>(<span class="keywordtype">int</span>)</div>
|
||||
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="group__malloc.html#gae1dd97b542420c87ae085e822b1229e8" title="Allocate size bytes.">mi_malloc()</a> </dd></dl>
|
||||
|
||||
|
@ -388,7 +392,7 @@ Macros</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate <em>count</em> blocks of type <em>tp</em>. </p>
|
||||
<p>Allocate <em class="arg">count</em> blocks of type <em class="arg">tp</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -416,7 +420,7 @@ Macros</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Re-allocate to <em>count</em> blocks of type <em>tp</em>. </p>
|
||||
<p>Re-allocate to <em class="arg">count</em> blocks of type <em class="arg">tp</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -435,7 +439,7 @@ Macros</h2></td></tr>
|
|||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Allocate a zero-initialized block of type <em>tp</em>. </p>
|
||||
<p>Allocate a zero-initialized block of type <em class="arg">tp</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -444,7 +448,7 @@ Macros</h2></td></tr>
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Zero initialized re-allocation</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -109,6 +109,9 @@ $(function(){initNavTree('group__zeroinit.html',''); initResizable(true); });
|
|||
<div class="headertitle"><div class="title">Zero initialized re-allocation</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>The zero-initialized re-allocations are only valid on memory that was originally allocated with zero initialization too.
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
|
@ -136,7 +139,8 @@ Functions</h2></td></tr>
|
|||
<tr class="separator:ga07b5bcbaf00d0d2e598c232982588496"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<p>The zero-initialized re-allocations are only valid on memory that was originally allocated with zero initialization too. e.g. <code>mi_calloc</code>, <code>mi_zalloc</code>, <code>mi_zalloc_aligned</code> etc. see <a href="https://github.com/microsoft/mimalloc/issues/63#issuecomment-508272992">https://github.com/microsoft/mimalloc/issues/63#issuecomment-508272992</a> </p>
|
||||
<p>The zero-initialized re-allocations are only valid on memory that was originally allocated with zero initialization too. </p>
|
||||
<p>e.g. <code>mi_calloc</code>, <code>mi_zalloc</code>, <code>mi_zalloc_aligned</code> etc. see <a href="https://github.com/microsoft/mimalloc/issues/63#issuecomment-508272992">https://github.com/microsoft/mimalloc/issues/63#issuecomment-508272992</a> </p>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="gad1a0d325d930eeb80f25e3fea37aacde" name="gad1a0d325d930eeb80f25e3fea37aacde"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad1a0d325d930eeb80f25e3fea37aacde">◆ </a></span>mi_heap_recalloc()</h2>
|
||||
|
@ -489,7 +493,7 @@ Functions</h2></td></tr>
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: mi-malloc</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -138,13 +138,13 @@ $(function(){initNavTree('index.html',''); initResizable(true); });
|
|||
<li><a class="el" href="group__cpp.html">C++ wrappers</a> </li>
|
||||
</ul>
|
||||
</div></div><!-- PageDoc -->
|
||||
<a href="doxygen_crawl.html"/>
|
||||
<a href="doxygen_crawl.html"></a>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
190
docs/jquery.js
vendored
190
docs/jquery.js
vendored
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: mimalloc-doc.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -108,7 +108,7 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/* ----------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">Copyright (c) 2018-2021, Microsoft Research, Daan Leijen</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">Copyright (c) 2018-2025, Microsoft Research, Daan Leijen</span></div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">This is free software; you can redistribute it and/or modify it under the</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">terms of the MIT license. A copy of the license can be found in the file</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">"LICENSE" at the root of this distribution.</span></div>
|
||||
|
@ -116,172 +116,174 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#error "documentation file only!"</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span></div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span></div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span></div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95"> 102</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95">mi_free</a>(<span class="keywordtype">void</span>* p);</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span></div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="group__malloc.html#gae1dd97b542420c87ae085e822b1229e8"> 108</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__malloc.html#gae1dd97b542420c87ae085e822b1229e8">mi_malloc</a>(<span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span></div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"><a class="line" href="group__malloc.html#gae6e38c4403247a7b40d80419e093bfb8"> 114</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__malloc.html#gae6e38c4403247a7b40d80419e093bfb8">mi_zalloc</a>(<span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span></div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="group__malloc.html#ga6686568014b54d1e6c7ac64a076e4f56"> 125</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__malloc.html#ga6686568014b54d1e6c7ac64a076e4f56">mi_calloc</a>(<span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span></div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"><a class="line" href="group__malloc.html#ga0621af6a5e3aa384e6a1b548958bf583"> 139</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__malloc.html#ga0621af6a5e3aa384e6a1b548958bf583">mi_realloc</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize);</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> </div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span></div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"><a class="line" href="group__malloc.html#ga23a0fbb452b5dce8e31fab1a1958cacc"> 151</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__malloc.html#ga23a0fbb452b5dce8e31fab1a1958cacc">mi_recalloc</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> </div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span></div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="group__malloc.html#ga19299856216cfbb08e2628593654dfb0"> 166</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__malloc.html#ga19299856216cfbb08e2628593654dfb0">mi_expand</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize);</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> </div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span></div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="group__malloc.html#ga61f46bade3db76ca24aaafedc40de7b6"> 177</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__malloc.html#ga61f46bade3db76ca24aaafedc40de7b6">mi_mallocn</a>(<span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> </div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span></div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"><a class="line" href="group__malloc.html#ga8bddfb4a1270a0854bbcf44cb3980467"> 188</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__malloc.html#ga8bddfb4a1270a0854bbcf44cb3980467">mi_reallocn</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> </div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span></div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"><a class="line" href="group__malloc.html#ga4dc3a4067037b151a64629fe8a332641"> 206</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__malloc.html#ga4dc3a4067037b151a64629fe8a332641">mi_reallocf</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize);</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> </div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> </div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span></div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"><a class="line" href="group__malloc.html#ga245ac90ebc2cfdd17de599e5fea59889"> 217</a></span><span class="keywordtype">char</span>* <a class="code hl_function" href="group__malloc.html#ga245ac90ebc2cfdd17de599e5fea59889">mi_strdup</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* s);</div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> </div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span></div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"><a class="line" href="group__malloc.html#ga486d0d26b3b3794f6d1cdb41a9aed92d"> 228</a></span><span class="keywordtype">char</span>* <a class="code hl_function" href="group__malloc.html#ga486d0d26b3b3794f6d1cdb41a9aed92d">mi_strndup</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* s, <span class="keywordtype">size_t</span> n);</div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> </div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span></div>
|
||||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"><a class="line" href="group__malloc.html#ga94c3afcc086e85d75a57e9f76b9b71dd"> 242</a></span><span class="keywordtype">char</span>* <a class="code hl_function" href="group__malloc.html#ga94c3afcc086e85d75a57e9f76b9b71dd">mi_realpath</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* fname, <span class="keywordtype">char</span>* resolved_name);</div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> </div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span></div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> </div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span><span class="comment">// ------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span><span class="comment">// Extended functionality</span></div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span><span class="comment">// ------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> </div>
|
||||
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> </div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span></div>
|
||||
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span></div>
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"><a class="line" href="group__extended.html#ga1ea64283508718d9d645c38efc2f4305"> 256</a></span><span class="preprocessor">#define MI_SMALL_SIZE_MAX (128*sizeof(void*))</span></div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> </div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span></div>
|
||||
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"><a class="line" href="group__extended.html#ga7f050bc6b897da82692174f5fce59cde"> 265</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__extended.html#ga7f050bc6b897da82692174f5fce59cde">mi_malloc_small</a>(<span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> </div>
|
||||
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span></div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"><a class="line" href="group__extended.html#ga51c47637e81df0e2f13a2d7a2dec123e"> 274</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__extended.html#ga51c47637e81df0e2f13a2d7a2dec123e">mi_zalloc_small</a>(<span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> </div>
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span></div>
|
||||
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"><a class="line" href="group__extended.html#ga089c859d9eddc5f9b4bd946cd53cebee"> 289</a></span><span class="keywordtype">size_t</span> <a class="code hl_function" href="group__extended.html#ga089c859d9eddc5f9b4bd946cd53cebee">mi_usable_size</a>(<span class="keywordtype">void</span>* p);</div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> </div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span></div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"><a class="line" href="group__extended.html#gac057927cd06c854b45fe7847e921bd47"> 300</a></span><span class="keywordtype">size_t</span> <a class="code hl_function" href="group__extended.html#gac057927cd06c854b45fe7847e921bd47">mi_good_size</a>(<span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> </div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span></div>
|
||||
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"><a class="line" href="group__extended.html#ga421430e2226d7d468529cec457396756"> 309</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#ga421430e2226d7d468529cec457396756">mi_collect</a>(<span class="keywordtype">bool</span> force);</div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> </div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span></div>
|
||||
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"><a class="line" href="group__extended.html#ga2d126e5c62d3badc35445e5d84166df2"> 315</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#ga2d126e5c62d3badc35445e5d84166df2">mi_stats_print</a>(<span class="keywordtype">void</span>* out);</div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> </div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span></div>
|
||||
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"><a class="line" href="group__extended.html#ga537f13b299ddf801e49a5a94fde02c79"> 322</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#ga537f13b299ddf801e49a5a94fde02c79">mi_stats_print_out</a>(<a class="code hl_typedef" href="group__extended.html#gadf31cea7d0332a81c8b882cbbdbadb8d">mi_output_fun</a>* out, <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> </div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span></div>
|
||||
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"><a class="line" href="group__extended.html#ga3bb8468b8cfcc6e2a61d98aee85c5f99"> 325</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#ga3bb8468b8cfcc6e2a61d98aee85c5f99">mi_stats_reset</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> </div>
|
||||
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span></div>
|
||||
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"><a class="line" href="group__extended.html#ga854b1de8cb067c7316286c28b2fcd3d1"> 328</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#ga854b1de8cb067c7316286c28b2fcd3d1">mi_stats_merge</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> </div>
|
||||
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span></div>
|
||||
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"><a class="line" href="group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17"> 333</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17">mi_thread_init</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> </div>
|
||||
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span></div>
|
||||
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"><a class="line" href="group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf"> 339</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf">mi_thread_done</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> </div>
|
||||
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span></div>
|
||||
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"><a class="line" href="group__extended.html#gab1dac8476c46cb9eecab767eb40c1525"> 346</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#gab1dac8476c46cb9eecab767eb40c1525">mi_thread_stats_print_out</a>(<a class="code hl_typedef" href="group__extended.html#gadf31cea7d0332a81c8b882cbbdbadb8d">mi_output_fun</a>* out, <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> </div>
|
||||
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span></div>
|
||||
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"><a class="line" href="group__extended.html#ga292a45f7dbc7cd23c5352ce1f0002816"> 354</a></span><span class="keyword">typedef</span> void (<a class="code hl_typedef" href="group__extended.html#ga292a45f7dbc7cd23c5352ce1f0002816">mi_deferred_free_fun</a>)(<span class="keywordtype">bool</span> force, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> heartbeat, <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> </div>
|
||||
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span></div>
|
||||
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"><a class="line" href="group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece"> 371</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece">mi_register_deferred_free</a>(<a class="code hl_typedef" href="group__extended.html#ga292a45f7dbc7cd23c5352ce1f0002816">mi_deferred_free_fun</a>* deferred_free, <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> </div>
|
||||
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span></div>
|
||||
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"><a class="line" href="group__extended.html#gadf31cea7d0332a81c8b882cbbdbadb8d"> 378</a></span><span class="keyword">typedef</span> void (<a class="code hl_typedef" href="group__extended.html#gadf31cea7d0332a81c8b882cbbdbadb8d">mi_output_fun</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span>* msg, <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> </div>
|
||||
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span></div>
|
||||
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"><a class="line" href="group__extended.html#gae5b17ff027cd2150b43a33040250cf3f"> 386</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#gae5b17ff027cd2150b43a33040250cf3f">mi_register_output</a>(<a class="code hl_typedef" href="group__extended.html#gadf31cea7d0332a81c8b882cbbdbadb8d">mi_output_fun</a>* out, <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> </div>
|
||||
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span></div>
|
||||
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"><a class="line" href="group__extended.html#ga83fc6a688b322261e1c2deab000b0591"> 393</a></span><span class="keyword">typedef</span> void (<a class="code hl_typedef" href="group__extended.html#ga83fc6a688b322261e1c2deab000b0591">mi_error_fun</a>)(<span class="keywordtype">int</span> err, <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> </div>
|
||||
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span></div>
|
||||
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"><a class="line" href="group__extended.html#gaa1d55e0e894be240827e5d87ec3a1f45"> 410</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#gaa1d55e0e894be240827e5d87ec3a1f45">mi_register_error</a>(<a class="code hl_typedef" href="group__extended.html#ga83fc6a688b322261e1c2deab000b0591">mi_error_fun</a>* errfun, <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> </div>
|
||||
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span></div>
|
||||
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"><a class="line" href="group__extended.html#ga5f071b10d4df1c3658e04e7fd67a94e6"> 416</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__extended.html#ga5f071b10d4df1c3658e04e7fd67a94e6">mi_is_in_heap_region</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* p);</div>
|
||||
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> </div>
|
||||
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span></div>
|
||||
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"><a class="line" href="group__extended.html#ga00ec3324b6b2591c7fe3677baa30a767"> 426</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="group__extended.html#ga00ec3324b6b2591c7fe3677baa30a767">mi_reserve_os_memory</a>(<span class="keywordtype">size_t</span> size, <span class="keywordtype">bool</span> commit, <span class="keywordtype">bool</span> allow_large);</div>
|
||||
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span> </div>
|
||||
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span></div>
|
||||
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"><a class="line" href="group__extended.html#ga4c6486a1fdcd7a423b5f25fe4be8e0cf"> 439</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__extended.html#ga4c6486a1fdcd7a423b5f25fe4be8e0cf">mi_manage_os_memory</a>(<span class="keywordtype">void</span>* start, <span class="keywordtype">size_t</span> size, <span class="keywordtype">bool</span> is_committed, <span class="keywordtype">bool</span> is_large, <span class="keywordtype">bool</span> is_zero, <span class="keywordtype">int</span> numa_node);</div>
|
||||
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> </div>
|
||||
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span></div>
|
||||
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"><a class="line" href="group__extended.html#ga3132f521fb756fc0e8ec0b74fb58df50"> 453</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="group__extended.html#ga3132f521fb756fc0e8ec0b74fb58df50">mi_reserve_huge_os_pages_interleave</a>(<span class="keywordtype">size_t</span> pages, <span class="keywordtype">size_t</span> numa_nodes, <span class="keywordtype">size_t</span> timeout_msecs);</div>
|
||||
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> </div>
|
||||
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span></div>
|
||||
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"><a class="line" href="group__extended.html#ga7795a13d20087447281858d2c771cca1"> 467</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="group__extended.html#ga7795a13d20087447281858d2c771cca1">mi_reserve_huge_os_pages_at</a>(<span class="keywordtype">size_t</span> pages, <span class="keywordtype">int</span> numa_node, <span class="keywordtype">size_t</span> timeout_msecs);</div>
|
||||
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span> </div>
|
||||
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span> </div>
|
||||
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span></div>
|
||||
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"><a class="line" href="group__extended.html#gaad25050b19f30cd79397b227e0157a3f"> 474</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__extended.html#gaad25050b19f30cd79397b227e0157a3f">mi_is_redirected</a>();</div>
|
||||
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span> </div>
|
||||
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span></div>
|
||||
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"><a class="line" href="group__extended.html#ga7d862c2affd5790381da14eb102a364d"> 489</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#ga7d862c2affd5790381da14eb102a364d">mi_process_info</a>(<span class="keywordtype">size_t</span>* elapsed_msecs, <span class="keywordtype">size_t</span>* user_msecs, <span class="keywordtype">size_t</span>* system_msecs, <span class="keywordtype">size_t</span>* current_rss, <span class="keywordtype">size_t</span>* peak_rss, <span class="keywordtype">size_t</span>* current_commit, <span class="keywordtype">size_t</span>* peak_commit, <span class="keywordtype">size_t</span>* page_faults);</div>
|
||||
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"> 490</span> </div>
|
||||
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"> 490</span></div>
|
||||
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"><a class="line" href="group__extended.html#gad7439207f8f71fb6c382a9ea20b997e7"> 495</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#gad7439207f8f71fb6c382a9ea20b997e7">mi_debug_show_arenas</a>(<span class="keywordtype">bool</span> show_inuse, <span class="keywordtype">bool</span> show_abandoned, <span class="keywordtype">bool</span> show_purge);</div>
|
||||
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> </div>
|
||||
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span></div>
|
||||
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"><a class="line" href="group__extended.html#ga99fe38650d0b02e0e0f89ee024db91d3"> 499</a></span><span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code hl_typedef" href="group__extended.html#ga99fe38650d0b02e0e0f89ee024db91d3">mi_arena_id_t</a>;</div>
|
||||
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> </div>
|
||||
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span></div>
|
||||
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"><a class="line" href="group__extended.html#ga9a25a00a22151619a0be91a10af7787f"> 505</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__extended.html#ga9a25a00a22151619a0be91a10af7787f">mi_arena_area</a>(<a class="code hl_typedef" href="group__extended.html#ga99fe38650d0b02e0e0f89ee024db91d3">mi_arena_id_t</a> arena_id, <span class="keywordtype">size_t</span>* size);</div>
|
||||
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> </div>
|
||||
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span></div>
|
||||
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"><a class="line" href="group__extended.html#ga591aab1c2bc2ca920e33f0f9f9cb5c52"> 514</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="group__extended.html#ga591aab1c2bc2ca920e33f0f9f9cb5c52">mi_reserve_huge_os_pages_at_ex</a>(<span class="keywordtype">size_t</span> pages, <span class="keywordtype">int</span> numa_node, <span class="keywordtype">size_t</span> timeout_msecs, <span class="keywordtype">bool</span> exclusive, <a class="code hl_typedef" href="group__extended.html#ga99fe38650d0b02e0e0f89ee024db91d3">mi_arena_id_t</a>* arena_id);</div>
|
||||
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> </div>
|
||||
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span></div>
|
||||
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"><a class="line" href="group__extended.html#ga32f519797fd9a81acb4f52d36e6d751b"> 523</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="group__extended.html#ga32f519797fd9a81acb4f52d36e6d751b">mi_reserve_os_memory_ex</a>(<span class="keywordtype">size_t</span> size, <span class="keywordtype">bool</span> commit, <span class="keywordtype">bool</span> allow_large, <span class="keywordtype">bool</span> exclusive, <a class="code hl_typedef" href="group__extended.html#ga99fe38650d0b02e0e0f89ee024db91d3">mi_arena_id_t</a>* arena_id);</div>
|
||||
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> </div>
|
||||
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span></div>
|
||||
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno"><a class="line" href="group__extended.html#ga41ce8525d77bbb60f618fa1029994f6e"> 535</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__extended.html#ga41ce8525d77bbb60f618fa1029994f6e">mi_manage_os_memory_ex</a>(<span class="keywordtype">void</span>* start, <span class="keywordtype">size_t</span> size, <span class="keywordtype">bool</span> is_committed, <span class="keywordtype">bool</span> is_large, <span class="keywordtype">bool</span> is_zero, <span class="keywordtype">int</span> numa_node, <span class="keywordtype">bool</span> exclusive, <a class="code hl_typedef" href="group__extended.html#ga99fe38650d0b02e0e0f89ee024db91d3">mi_arena_id_t</a>* arena_id);</div>
|
||||
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span> </div>
|
||||
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span></div>
|
||||
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno"><a class="line" href="group__extended.html#gaaf2d9976576d5efd5544be12848af949"> 540</a></span><a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* <a class="code hl_function" href="group__extended.html#gaaf2d9976576d5efd5544be12848af949">mi_heap_new_in_arena</a>(<a class="code hl_typedef" href="group__extended.html#ga99fe38650d0b02e0e0f89ee024db91d3">mi_arena_id_t</a> arena_id);</div>
|
||||
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno"> 541</span> </div>
|
||||
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno"> 541</span></div>
|
||||
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno"><a class="line" href="group__extended.html#ga3ae360583f4351aa5267ee7e43008faf"> 552</a></span><a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* <a class="code hl_function" href="group__extended.html#ga3ae360583f4351aa5267ee7e43008faf">mi_heap_new_ex</a>(<span class="keywordtype">int</span> heap_tag, <span class="keywordtype">bool</span> allow_destroy, <a class="code hl_typedef" href="group__extended.html#ga99fe38650d0b02e0e0f89ee024db91d3">mi_arena_id_t</a> arena_id);</div>
|
||||
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"> 553</span> </div>
|
||||
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"> 553</span></div>
|
||||
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno"><a class="line" href="group__extended.html#ga8c0bcd1fee27c7641e9c3c0d991b3b7d"> 557</a></span><span class="keyword">typedef</span> <span class="keywordtype">void</span>* <a class="code hl_typedef" href="group__extended.html#ga8c0bcd1fee27c7641e9c3c0d991b3b7d">mi_subproc_id_t</a>;</div>
|
||||
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"> 558</span> </div>
|
||||
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"> 558</span></div>
|
||||
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno"><a class="line" href="group__extended.html#ga2ecba0d7ebdc99e71bb985c4a1609806"> 560</a></span><a class="code hl_typedef" href="group__extended.html#ga8c0bcd1fee27c7641e9c3c0d991b3b7d">mi_subproc_id_t</a> <a class="code hl_function" href="group__extended.html#ga2ecba0d7ebdc99e71bb985c4a1609806">mi_subproc_main</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"> 561</span> </div>
|
||||
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"> 561</span></div>
|
||||
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"><a class="line" href="group__extended.html#ga8068cac328e41fa2170faef707315243"> 564</a></span><a class="code hl_typedef" href="group__extended.html#ga8c0bcd1fee27c7641e9c3c0d991b3b7d">mi_subproc_id_t</a> <a class="code hl_function" href="group__extended.html#ga8068cac328e41fa2170faef707315243">mi_subproc_new</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span> </div>
|
||||
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span></div>
|
||||
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno"><a class="line" href="group__extended.html#gaa7d263e9429bac9ac8345c9d25de610e"> 569</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#gaa7d263e9429bac9ac8345c9d25de610e">mi_subproc_delete</a>(<a class="code hl_typedef" href="group__extended.html#ga8c0bcd1fee27c7641e9c3c0d991b3b7d">mi_subproc_id_t</a> subproc);</div>
|
||||
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno"> 570</span> </div>
|
||||
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno"> 570</span></div>
|
||||
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno"><a class="line" href="group__extended.html#gadbc53414eb68b275588ec001ce1ddc7c"> 573</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__extended.html#gadbc53414eb68b275588ec001ce1ddc7c">mi_subproc_add_current_thread</a>(<a class="code hl_typedef" href="group__extended.html#ga8c0bcd1fee27c7641e9c3c0d991b3b7d">mi_subproc_id_t</a> subproc);</div>
|
||||
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno"> 574</span> </div>
|
||||
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno"> 575</span> </div>
|
||||
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno"> 575</span></div>
|
||||
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"> 577</span> </div>
|
||||
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span><span class="comment">// ------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"> 579</span><span class="comment">// Aligned allocation</span></div>
|
||||
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"> 580</span><span class="comment">// ------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"> 581</span> </div>
|
||||
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"> 589</span> </div>
|
||||
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"> 581</span></div>
|
||||
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"> 589</span></div>
|
||||
<div class="line"><a id="l00607" name="l00607"></a><span class="lineno"><a class="line" href="group__aligned.html#ga69578ff1a98ca16e1dcd02c0995cd65c"> 607</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__aligned.html#ga69578ff1a98ca16e1dcd02c0995cd65c">mi_malloc_aligned</a>(<span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment);</div>
|
||||
<div class="line"><a id="l00608" name="l00608"></a><span class="lineno"><a class="line" href="group__aligned.html#gaac7d0beb782f9b9ac31f47492b130f82"> 608</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__aligned.html#gaac7d0beb782f9b9ac31f47492b130f82">mi_zalloc_aligned</a>(<span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment);</div>
|
||||
<div class="line"><a id="l00609" name="l00609"></a><span class="lineno"><a class="line" href="group__aligned.html#ga424ef386fb1f9f8e0a86ab53f16eaaf1"> 609</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__aligned.html#ga424ef386fb1f9f8e0a86ab53f16eaaf1">mi_calloc_aligned</a>(<span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment);</div>
|
||||
<div class="line"><a id="l00610" name="l00610"></a><span class="lineno"><a class="line" href="group__aligned.html#ga5d7a46d054b4d7abe9d8d2474add2edf"> 610</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__aligned.html#ga5d7a46d054b4d7abe9d8d2474add2edf">mi_realloc_aligned</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize, <span class="keywordtype">size_t</span> alignment);</div>
|
||||
<div class="line"><a id="l00611" name="l00611"></a><span class="lineno"> 611</span> </div>
|
||||
<div class="line"><a id="l00611" name="l00611"></a><span class="lineno"> 611</span></div>
|
||||
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno"><a class="line" href="group__aligned.html#ga2022f71b95a7cd6cce1b6e07752ae8ca"> 623</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__aligned.html#ga2022f71b95a7cd6cce1b6e07752ae8ca">mi_malloc_aligned_at</a>(<span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment, <span class="keywordtype">size_t</span> offset);</div>
|
||||
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno"><a class="line" href="group__aligned.html#ga7c1778805ce50ebbf02ccbd5e39d5dba"> 624</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__aligned.html#ga7c1778805ce50ebbf02ccbd5e39d5dba">mi_zalloc_aligned_at</a>(<span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment, <span class="keywordtype">size_t</span> offset);</div>
|
||||
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno"><a class="line" href="group__aligned.html#ga977f96bd2c5c141bcd70e6685c90d6c3"> 625</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__aligned.html#ga977f96bd2c5c141bcd70e6685c90d6c3">mi_calloc_aligned_at</a>(<span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment, <span class="keywordtype">size_t</span> offset);</div>
|
||||
<div class="line"><a id="l00626" name="l00626"></a><span class="lineno"><a class="line" href="group__aligned.html#gad06dcf2bb8faadb2c8ea61ee5d24bbf6"> 626</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__aligned.html#gad06dcf2bb8faadb2c8ea61ee5d24bbf6">mi_realloc_aligned_at</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize, <span class="keywordtype">size_t</span> alignment, <span class="keywordtype">size_t</span> offset);</div>
|
||||
<div class="line"><a id="l00627" name="l00627"></a><span class="lineno"> 627</span> </div>
|
||||
<div class="line"><a id="l00629" name="l00629"></a><span class="lineno"> 629</span> </div>
|
||||
<div class="line"><a id="l00635" name="l00635"></a><span class="lineno"> 635</span> </div>
|
||||
<div class="line"><a id="l00627" name="l00627"></a><span class="lineno"> 627</span></div>
|
||||
<div class="line"><a id="l00629" name="l00629"></a><span class="lineno"> 629</span></div>
|
||||
<div class="line"><a id="l00635" name="l00635"></a><span class="lineno"> 635</span></div>
|
||||
<div class="line"><a id="l00640" name="l00640"></a><span class="lineno"> 640</span><span class="keyword">struct </span>mi_heap_s;</div>
|
||||
<div class="line"><a id="l00641" name="l00641"></a><span class="lineno"> 641</span> </div>
|
||||
<div class="line"><a id="l00641" name="l00641"></a><span class="lineno"> 641</span></div>
|
||||
<div class="line"><a id="l00646" name="l00646"></a><span class="lineno"><a class="line" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2"> 646</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>mi_heap_s <a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>;</div>
|
||||
<div class="line"><a id="l00647" name="l00647"></a><span class="lineno"> 647</span> </div>
|
||||
<div class="line"><a id="l00647" name="l00647"></a><span class="lineno"> 647</span></div>
|
||||
<div class="line"><a id="l00649" name="l00649"></a><span class="lineno"><a class="line" href="group__heap.html#gaa718bb226ec0546ba6d1b6cb32179f3a"> 649</a></span><a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* <a class="code hl_function" href="group__heap.html#gaa718bb226ec0546ba6d1b6cb32179f3a">mi_heap_new</a>();</div>
|
||||
<div class="line"><a id="l00650" name="l00650"></a><span class="lineno"> 650</span> </div>
|
||||
<div class="line"><a id="l00650" name="l00650"></a><span class="lineno"> 650</span></div>
|
||||
<div class="line"><a id="l00658" name="l00658"></a><span class="lineno"><a class="line" href="group__heap.html#ga2ab1af8d438819b55319c7ef51d1e409"> 658</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__heap.html#ga2ab1af8d438819b55319c7ef51d1e409">mi_heap_delete</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap);</div>
|
||||
<div class="line"><a id="l00659" name="l00659"></a><span class="lineno"> 659</span> </div>
|
||||
<div class="line"><a id="l00659" name="l00659"></a><span class="lineno"> 659</span></div>
|
||||
<div class="line"><a id="l00667" name="l00667"></a><span class="lineno"><a class="line" href="group__heap.html#ga9f9c0844edb9717f4feacd79116b8e0d"> 667</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__heap.html#ga9f9c0844edb9717f4feacd79116b8e0d">mi_heap_destroy</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap);</div>
|
||||
<div class="line"><a id="l00668" name="l00668"></a><span class="lineno"> 668</span> </div>
|
||||
<div class="line"><a id="l00668" name="l00668"></a><span class="lineno"> 668</span></div>
|
||||
<div class="line"><a id="l00672" name="l00672"></a><span class="lineno"><a class="line" href="group__heap.html#ga349b677dec7da5eacdbc7a385bd62a4a"> 672</a></span><a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* <a class="code hl_function" href="group__heap.html#ga349b677dec7da5eacdbc7a385bd62a4a">mi_heap_set_default</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap);</div>
|
||||
<div class="line"><a id="l00673" name="l00673"></a><span class="lineno"> 673</span> </div>
|
||||
<div class="line"><a id="l00673" name="l00673"></a><span class="lineno"> 673</span></div>
|
||||
<div class="line"><a id="l00676" name="l00676"></a><span class="lineno"><a class="line" href="group__heap.html#ga14c667a6e2c5d28762d8cb7d4e057909"> 676</a></span><a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* <a class="code hl_function" href="group__heap.html#ga14c667a6e2c5d28762d8cb7d4e057909">mi_heap_get_default</a>();</div>
|
||||
<div class="line"><a id="l00677" name="l00677"></a><span class="lineno"> 677</span> </div>
|
||||
<div class="line"><a id="l00677" name="l00677"></a><span class="lineno"> 677</span></div>
|
||||
<div class="line"><a id="l00683" name="l00683"></a><span class="lineno"><a class="line" href="group__heap.html#gac6ac9f0e7be9ab4ff70acfc8dad1235a"> 683</a></span><a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* <a class="code hl_function" href="group__heap.html#gac6ac9f0e7be9ab4ff70acfc8dad1235a">mi_heap_get_backing</a>();</div>
|
||||
<div class="line"><a id="l00684" name="l00684"></a><span class="lineno"> 684</span> </div>
|
||||
<div class="line"><a id="l00684" name="l00684"></a><span class="lineno"> 684</span></div>
|
||||
<div class="line"><a id="l00686" name="l00686"></a><span class="lineno"><a class="line" href="group__heap.html#ga7922f7495cde30b1984d0e6072419298"> 686</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__heap.html#ga7922f7495cde30b1984d0e6072419298">mi_heap_collect</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">bool</span> force);</div>
|
||||
<div class="line"><a id="l00687" name="l00687"></a><span class="lineno"> 687</span> </div>
|
||||
<div class="line"><a id="l00687" name="l00687"></a><span class="lineno"> 687</span></div>
|
||||
<div class="line"><a id="l00690" name="l00690"></a><span class="lineno"><a class="line" href="group__heap.html#gab374e206c7034e0d899fb934e4f4a863"> 690</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__heap.html#gab374e206c7034e0d899fb934e4f4a863">mi_heap_malloc</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00691" name="l00691"></a><span class="lineno"> 691</span> </div>
|
||||
<div class="line"><a id="l00691" name="l00691"></a><span class="lineno"> 691</span></div>
|
||||
<div class="line"><a id="l00695" name="l00695"></a><span class="lineno"><a class="line" href="group__heap.html#ga012c5c8abe22b10043de39ff95909541"> 695</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__heap.html#ga012c5c8abe22b10043de39ff95909541">mi_heap_malloc_small</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00696" name="l00696"></a><span class="lineno"> 696</span> </div>
|
||||
<div class="line"><a id="l00696" name="l00696"></a><span class="lineno"> 696</span></div>
|
||||
<div class="line"><a id="l00699" name="l00699"></a><span class="lineno"><a class="line" href="group__heap.html#gabebc796399619d964d8db77aa835e8c1"> 699</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__heap.html#gabebc796399619d964d8db77aa835e8c1">mi_heap_zalloc</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00700" name="l00700"></a><span class="lineno"> 700</span> </div>
|
||||
<div class="line"><a id="l00700" name="l00700"></a><span class="lineno"> 700</span></div>
|
||||
<div class="line"><a id="l00703" name="l00703"></a><span class="lineno"><a class="line" href="group__heap.html#gac0098aaf231d3e9586c73136d5df95da"> 703</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__heap.html#gac0098aaf231d3e9586c73136d5df95da">mi_heap_calloc</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00704" name="l00704"></a><span class="lineno"> 704</span> </div>
|
||||
<div class="line"><a id="l00704" name="l00704"></a><span class="lineno"> 704</span></div>
|
||||
<div class="line"><a id="l00707" name="l00707"></a><span class="lineno"><a class="line" href="group__heap.html#gab0f755c0b21c387fe8e9024200faa372"> 707</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__heap.html#gab0f755c0b21c387fe8e9024200faa372">mi_heap_mallocn</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00708" name="l00708"></a><span class="lineno"> 708</span> </div>
|
||||
<div class="line"><a id="l00708" name="l00708"></a><span class="lineno"> 708</span></div>
|
||||
<div class="line"><a id="l00711" name="l00711"></a><span class="lineno"><a class="line" href="group__heap.html#ga5754e09ccc51dd6bc73885bb6ea21b7a"> 711</a></span><span class="keywordtype">char</span>* <a class="code hl_function" href="group__heap.html#ga5754e09ccc51dd6bc73885bb6ea21b7a">mi_heap_strdup</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keyword">const</span> <span class="keywordtype">char</span>* s);</div>
|
||||
<div class="line"><a id="l00712" name="l00712"></a><span class="lineno"> 712</span> </div>
|
||||
<div class="line"><a id="l00712" name="l00712"></a><span class="lineno"> 712</span></div>
|
||||
<div class="line"><a id="l00715" name="l00715"></a><span class="lineno"><a class="line" href="group__heap.html#gad224df78f1fbee942df8adf023e12cf3"> 715</a></span><span class="keywordtype">char</span>* <a class="code hl_function" href="group__heap.html#gad224df78f1fbee942df8adf023e12cf3">mi_heap_strndup</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keyword">const</span> <span class="keywordtype">char</span>* s, <span class="keywordtype">size_t</span> n);</div>
|
||||
<div class="line"><a id="l00716" name="l00716"></a><span class="lineno"> 716</span> </div>
|
||||
<div class="line"><a id="l00716" name="l00716"></a><span class="lineno"> 716</span></div>
|
||||
<div class="line"><a id="l00719" name="l00719"></a><span class="lineno"><a class="line" href="group__heap.html#ga55545a3ec6da29c5b4f62e540ecac1e2"> 719</a></span><span class="keywordtype">char</span>* <a class="code hl_function" href="group__heap.html#ga55545a3ec6da29c5b4f62e540ecac1e2">mi_heap_realpath</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keyword">const</span> <span class="keywordtype">char</span>* fname, <span class="keywordtype">char</span>* resolved_name);</div>
|
||||
<div class="line"><a id="l00720" name="l00720"></a><span class="lineno"> 720</span> </div>
|
||||
<div class="line"><a id="l00721" name="l00721"></a><span class="lineno"><a class="line" href="group__heap.html#gac5252d6a2e510bd349e4fcb452e6a93a"> 721</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__heap.html#gac5252d6a2e510bd349e4fcb452e6a93a">mi_heap_realloc</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize);</div>
|
||||
|
@ -296,9 +298,9 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
<div class="line"><a id="l00730" name="l00730"></a><span class="lineno"><a class="line" href="group__heap.html#gaa42ec2079989c4374f2c331d9b35f4e4"> 730</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__heap.html#gaa42ec2079989c4374f2c331d9b35f4e4">mi_heap_calloc_aligned_at</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment, <span class="keywordtype">size_t</span> offset);</div>
|
||||
<div class="line"><a id="l00731" name="l00731"></a><span class="lineno"><a class="line" href="group__heap.html#gaccf8c249872f30bf1c2493a09197d734"> 731</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__heap.html#gaccf8c249872f30bf1c2493a09197d734">mi_heap_realloc_aligned</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize, <span class="keywordtype">size_t</span> alignment);</div>
|
||||
<div class="line"><a id="l00732" name="l00732"></a><span class="lineno"><a class="line" href="group__heap.html#ga6df988a7219d5707f010d5f3eb0dc3f5"> 732</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__heap.html#ga6df988a7219d5707f010d5f3eb0dc3f5">mi_heap_realloc_aligned_at</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize, <span class="keywordtype">size_t</span> alignment, <span class="keywordtype">size_t</span> offset);</div>
|
||||
<div class="line"><a id="l00733" name="l00733"></a><span class="lineno"> 733</span> </div>
|
||||
<div class="line"><a id="l00733" name="l00733"></a><span class="lineno"> 733</span></div>
|
||||
<div class="line"><a id="l00735" name="l00735"></a><span class="lineno"> 735</span> </div>
|
||||
<div class="line"><a id="l00736" name="l00736"></a><span class="lineno"> 736</span> </div>
|
||||
<div class="line"><a id="l00736" name="l00736"></a><span class="lineno"> 736</span></div>
|
||||
<div class="line"><a id="l00745" name="l00745"></a><span class="lineno"> 745</span> </div>
|
||||
<div class="line"><a id="l00746" name="l00746"></a><span class="lineno"><a class="line" href="group__zeroinit.html#gadfd34cd7b4f2bbda7ae06367a6360756"> 746</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__zeroinit.html#gadfd34cd7b4f2bbda7ae06367a6360756">mi_rezalloc</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize);</div>
|
||||
<div class="line"><a id="l00747" name="l00747"></a><span class="lineno"> 747</span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__malloc.html#ga23a0fbb452b5dce8e31fab1a1958cacc">mi_recalloc</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newcount, <span class="keywordtype">size_t</span> size) ;</div>
|
||||
|
@ -315,39 +317,39 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
<div class="line"><a id="l00758" name="l00758"></a><span class="lineno"><a class="line" href="group__zeroinit.html#ga2bafa79c3f98ea74882349d44cffa5d9"> 758</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__zeroinit.html#ga2bafa79c3f98ea74882349d44cffa5d9">mi_heap_rezalloc_aligned_at</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize, <span class="keywordtype">size_t</span> alignment, <span class="keywordtype">size_t</span> offset);</div>
|
||||
<div class="line"><a id="l00759" name="l00759"></a><span class="lineno"><a class="line" href="group__zeroinit.html#ga87ddd674bf1c67237d780d0b9e0f0f32"> 759</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__zeroinit.html#ga87ddd674bf1c67237d780d0b9e0f0f32">mi_heap_recalloc_aligned</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newcount, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment);</div>
|
||||
<div class="line"><a id="l00760" name="l00760"></a><span class="lineno"><a class="line" href="group__zeroinit.html#ga07b5bcbaf00d0d2e598c232982588496"> 760</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__zeroinit.html#ga07b5bcbaf00d0d2e598c232982588496">mi_heap_recalloc_aligned_at</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newcount, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment, <span class="keywordtype">size_t</span> offset);</div>
|
||||
<div class="line"><a id="l00761" name="l00761"></a><span class="lineno"> 761</span> </div>
|
||||
<div class="line"><a id="l00763" name="l00763"></a><span class="lineno"> 763</span> </div>
|
||||
<div class="line"><a id="l00772" name="l00772"></a><span class="lineno"> 772</span> </div>
|
||||
<div class="line"><a id="l00761" name="l00761"></a><span class="lineno"> 761</span></div>
|
||||
<div class="line"><a id="l00763" name="l00763"></a><span class="lineno"> 763</span></div>
|
||||
<div class="line"><a id="l00772" name="l00772"></a><span class="lineno"> 772</span></div>
|
||||
<div class="line"><a id="l00784" name="l00784"></a><span class="lineno"><a class="line" href="group__typed.html#ga0619a62c5fd886f1016030abe91f0557"> 784</a></span><span class="preprocessor">#define mi_malloc_tp(tp) ((tp*)mi_malloc(sizeof(tp)))</span></div>
|
||||
<div class="line"><a id="l00785" name="l00785"></a><span class="lineno"> 785</span> </div>
|
||||
<div class="line"><a id="l00785" name="l00785"></a><span class="lineno"> 785</span></div>
|
||||
<div class="line"><a id="l00787" name="l00787"></a><span class="lineno"><a class="line" href="group__typed.html#gac77a61bdaf680a803785fe307820b48c"> 787</a></span><span class="preprocessor">#define mi_zalloc_tp(tp) ((tp*)mi_zalloc(sizeof(tp)))</span></div>
|
||||
<div class="line"><a id="l00788" name="l00788"></a><span class="lineno"> 788</span> </div>
|
||||
<div class="line"><a id="l00788" name="l00788"></a><span class="lineno"> 788</span></div>
|
||||
<div class="line"><a id="l00790" name="l00790"></a><span class="lineno"><a class="line" href="group__typed.html#gae80c47c9d4cab10961fff1a8ac98fc07"> 790</a></span><span class="preprocessor">#define mi_calloc_tp(tp,count) ((tp*)mi_calloc(count,sizeof(tp)))</span></div>
|
||||
<div class="line"><a id="l00791" name="l00791"></a><span class="lineno"> 791</span> </div>
|
||||
<div class="line"><a id="l00791" name="l00791"></a><span class="lineno"> 791</span></div>
|
||||
<div class="line"><a id="l00793" name="l00793"></a><span class="lineno"><a class="line" href="group__typed.html#gae5cb6e0fafc9f23169c5622e077afe8b"> 793</a></span><span class="preprocessor">#define mi_mallocn_tp(tp,count) ((tp*)mi_mallocn(count,sizeof(tp)))</span></div>
|
||||
<div class="line"><a id="l00794" name="l00794"></a><span class="lineno"> 794</span> </div>
|
||||
<div class="line"><a id="l00794" name="l00794"></a><span class="lineno"> 794</span></div>
|
||||
<div class="line"><a id="l00796" name="l00796"></a><span class="lineno"><a class="line" href="group__typed.html#ga1158b49a55dfa81f58a4426a7578f523"> 796</a></span><span class="preprocessor">#define mi_reallocn_tp(p,tp,count) ((tp*)mi_reallocn(p,count,sizeof(tp)))</span></div>
|
||||
<div class="line"><a id="l00797" name="l00797"></a><span class="lineno"> 797</span> </div>
|
||||
<div class="line"><a id="l00797" name="l00797"></a><span class="lineno"> 797</span></div>
|
||||
<div class="line"><a id="l00799" name="l00799"></a><span class="lineno"><a class="line" href="group__typed.html#ga653bcb24ac495bc19940ecd6898f9cd7"> 799</a></span><span class="preprocessor">#define mi_heap_malloc_tp(hp,tp) ((tp*)mi_heap_malloc(hp,sizeof(tp)))</span></div>
|
||||
<div class="line"><a id="l00800" name="l00800"></a><span class="lineno"> 800</span> </div>
|
||||
<div class="line"><a id="l00800" name="l00800"></a><span class="lineno"> 800</span></div>
|
||||
<div class="line"><a id="l00802" name="l00802"></a><span class="lineno"><a class="line" href="group__typed.html#gad6e87e86e994aa14416ae9b5d4c188fe"> 802</a></span><span class="preprocessor">#define mi_heap_zalloc_tp(hp,tp) ((tp*)mi_heap_zalloc(hp,sizeof(tp)))</span></div>
|
||||
<div class="line"><a id="l00803" name="l00803"></a><span class="lineno"> 803</span> </div>
|
||||
<div class="line"><a id="l00803" name="l00803"></a><span class="lineno"> 803</span></div>
|
||||
<div class="line"><a id="l00805" name="l00805"></a><span class="lineno"><a class="line" href="group__typed.html#ga4e5d1f1707c90e5f55e023ac5f45fe74"> 805</a></span><span class="preprocessor">#define mi_heap_calloc_tp(hp,tp,count) ((tp*)mi_heap_calloc(hp,count,sizeof(tp)))</span></div>
|
||||
<div class="line"><a id="l00806" name="l00806"></a><span class="lineno"> 806</span> </div>
|
||||
<div class="line"><a id="l00806" name="l00806"></a><span class="lineno"> 806</span></div>
|
||||
<div class="line"><a id="l00808" name="l00808"></a><span class="lineno"><a class="line" href="group__typed.html#ga6b75cb9c4b9c647661d0924552dc6e83"> 808</a></span><span class="preprocessor">#define mi_heap_mallocn_tp(hp,tp,count) ((tp*)mi_heap_mallocn(hp,count,sizeof(tp)))</span></div>
|
||||
<div class="line"><a id="l00809" name="l00809"></a><span class="lineno"> 809</span> </div>
|
||||
<div class="line"><a id="l00809" name="l00809"></a><span class="lineno"> 809</span></div>
|
||||
<div class="line"><a id="l00811" name="l00811"></a><span class="lineno"><a class="line" href="group__typed.html#gaf213d5422ec35e7f6caad827c79bc948"> 811</a></span><span class="preprocessor">#define mi_heap_reallocn_tp(hp,p,tp,count) ((tp*)mi_heap_reallocn(p,count,sizeof(tp)))</span></div>
|
||||
<div class="line"><a id="l00812" name="l00812"></a><span class="lineno"> 812</span> </div>
|
||||
<div class="line"><a id="l00812" name="l00812"></a><span class="lineno"> 812</span></div>
|
||||
<div class="line"><a id="l00814" name="l00814"></a><span class="lineno"><a class="line" href="group__typed.html#ga3e50a1600958fcaf1a7f3560c9174f9e"> 814</a></span><span class="preprocessor">#define mi_heap_recalloc_tp(hp,p,tp,count) ((tp*)mi_heap_recalloc(p,count,sizeof(tp)))</span></div>
|
||||
<div class="line"><a id="l00815" name="l00815"></a><span class="lineno"> 815</span> </div>
|
||||
<div class="line"><a id="l00817" name="l00817"></a><span class="lineno"> 817</span> </div>
|
||||
<div class="line"><a id="l00823" name="l00823"></a><span class="lineno"> 823</span> </div>
|
||||
<div class="line"><a id="l00815" name="l00815"></a><span class="lineno"> 815</span></div>
|
||||
<div class="line"><a id="l00817" name="l00817"></a><span class="lineno"> 817</span></div>
|
||||
<div class="line"><a id="l00823" name="l00823"></a><span class="lineno"> 823</span></div>
|
||||
<div class="line"><a id="l00830" name="l00830"></a><span class="lineno"><a class="line" href="group__analysis.html#gaa862aa8ed8d57d84cae41fc1022d71af"> 830</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__analysis.html#gaa862aa8ed8d57d84cae41fc1022d71af">mi_heap_contains_block</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keyword">const</span> <span class="keywordtype">void</span>* p);</div>
|
||||
<div class="line"><a id="l00831" name="l00831"></a><span class="lineno"> 831</span> </div>
|
||||
<div class="line"><a id="l00831" name="l00831"></a><span class="lineno"> 831</span></div>
|
||||
<div class="line"><a id="l00840" name="l00840"></a><span class="lineno"><a class="line" href="group__analysis.html#ga0d67c1789faaa15ff366c024fcaf6377"> 840</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__analysis.html#ga0d67c1789faaa15ff366c024fcaf6377">mi_heap_check_owned</a>(<a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keyword">const</span> <span class="keywordtype">void</span>* p);</div>
|
||||
<div class="line"><a id="l00841" name="l00841"></a><span class="lineno"> 841</span> </div>
|
||||
<div class="line"><a id="l00841" name="l00841"></a><span class="lineno"> 841</span></div>
|
||||
<div class="line"><a id="l00849" name="l00849"></a><span class="lineno"><a class="line" href="group__analysis.html#ga628c237489c2679af84a4d0d143b3dd5"> 849</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__analysis.html#ga628c237489c2679af84a4d0d143b3dd5">mi_check_owned</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* p);</div>
|
||||
<div class="line"><a id="l00850" name="l00850"></a><span class="lineno"> 850</span> </div>
|
||||
<div class="line"><a id="l00850" name="l00850"></a><span class="lineno"> 850</span></div>
|
||||
<div class="foldopen" id="foldopen00853" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00853" name="l00853"></a><span class="lineno"><a class="line" href="group__analysis.html"> 853</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>mi_heap_area_s {</div>
|
||||
<div class="line"><a id="l00854" name="l00854"></a><span class="lineno"><a class="line" href="group__analysis.html#ae0085e6e1cf059a4eb7767e30e9991b8"> 854</a></span> <span class="keywordtype">void</span>* <a class="code hl_variable" href="group__analysis.html#ae0085e6e1cf059a4eb7767e30e9991b8">blocks</a>; </div>
|
||||
|
@ -359,15 +361,15 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
<div class="line"><a id="l00860" name="l00860"></a><span class="lineno"><a class="line" href="group__analysis.html#a2b7a0c92ece8daf46b558efc990ebdc1"> 860</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="group__analysis.html#a2b7a0c92ece8daf46b558efc990ebdc1">heap_tag</a>; </div>
|
||||
<div class="line"><a id="l00861" name="l00861"></a><span class="lineno"> 861</span>} <a class="code hl_struct" href="group__analysis.html#structmi__heap__area__t">mi_heap_area_t</a>;</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00862" name="l00862"></a><span class="lineno"> 862</span> </div>
|
||||
<div class="line"><a id="l00862" name="l00862"></a><span class="lineno"> 862</span></div>
|
||||
<div class="line"><a id="l00870" name="l00870"></a><span class="lineno"><a class="line" href="group__analysis.html#ga8255dc9371e6b299d9802a610c4e34ec"> 870</a></span><span class="keyword">typedef</span> bool (<a class="code hl_typedef" href="group__analysis.html#ga8255dc9371e6b299d9802a610c4e34ec">mi_block_visit_fun</a>)(<span class="keyword">const</span> <a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keyword">const</span> <a class="code hl_struct" href="group__analysis.html#structmi__heap__area__t">mi_heap_area_t</a>* area, <span class="keywordtype">void</span>* block, <span class="keywordtype">size_t</span> block_size, <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a id="l00871" name="l00871"></a><span class="lineno"> 871</span> </div>
|
||||
<div class="line"><a id="l00871" name="l00871"></a><span class="lineno"> 871</span></div>
|
||||
<div class="line"><a id="l00883" name="l00883"></a><span class="lineno"><a class="line" href="group__analysis.html#ga70c46687dc6e9dc98b232b02646f8bed"> 883</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__analysis.html#ga70c46687dc6e9dc98b232b02646f8bed">mi_heap_visit_blocks</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a>* heap, <span class="keywordtype">bool</span> visit_all_blocks, <a class="code hl_typedef" href="group__analysis.html#ga8255dc9371e6b299d9802a610c4e34ec">mi_block_visit_fun</a>* visitor, <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a id="l00884" name="l00884"></a><span class="lineno"> 884</span> </div>
|
||||
<div class="line"><a id="l00884" name="l00884"></a><span class="lineno"> 884</span></div>
|
||||
<div class="line"><a id="l00900" name="l00900"></a><span class="lineno"><a class="line" href="group__analysis.html#ga6a4865a887b2ec5247854af61562503c"> 900</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__analysis.html#ga6a4865a887b2ec5247854af61562503c">mi_abandoned_visit_blocks</a>(<a class="code hl_typedef" href="group__extended.html#ga8c0bcd1fee27c7641e9c3c0d991b3b7d">mi_subproc_id_t</a> subproc_id, <span class="keywordtype">int</span> heap_tag, <span class="keywordtype">bool</span> visit_blocks, <a class="code hl_typedef" href="group__analysis.html#ga8255dc9371e6b299d9802a610c4e34ec">mi_block_visit_fun</a>* visitor, <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a id="l00901" name="l00901"></a><span class="lineno"> 901</span> </div>
|
||||
<div class="line"><a id="l00903" name="l00903"></a><span class="lineno"> 903</span> </div>
|
||||
<div class="line"><a id="l00909" name="l00909"></a><span class="lineno"> 909</span> </div>
|
||||
<div class="line"><a id="l00901" name="l00901"></a><span class="lineno"> 901</span></div>
|
||||
<div class="line"><a id="l00903" name="l00903"></a><span class="lineno"> 903</span></div>
|
||||
<div class="line"><a id="l00909" name="l00909"></a><span class="lineno"> 909</span></div>
|
||||
<div class="foldopen" id="foldopen00911" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00911" name="l00911"></a><span class="lineno"><a class="line" href="group__options.html#gafebf7ed116adb38ae5218bc3ce06884c"> 911</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span> mi_option_e {</div>
|
||||
<div class="line"><a id="l00912" name="l00912"></a><span class="lineno"> 912</span> <span class="comment">// stable options</span></div>
|
||||
|
@ -404,8 +406,8 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
<div class="line"><a id="l00943" name="l00943"></a><span class="lineno"><a class="line" href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caeae1696100e4057ffc4182730cc04e40"> 943</a></span> <a class="code hl_enumvalue" href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caeae1696100e4057ffc4182730cc04e40">mi_option_disallow_arena_alloc</a>, </div>
|
||||
<div class="line"><a id="l00944" name="l00944"></a><span class="lineno"><a class="line" href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca38c67733a3956a1f4eeaca89fab9e78e"> 944</a></span> <a class="code hl_enumvalue" href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca38c67733a3956a1f4eeaca89fab9e78e">mi_option_visit_abandoned</a>, </div>
|
||||
<div class="line"><a id="l00945" name="l00945"></a><span class="lineno"> 945</span> </div>
|
||||
<div class="line"><a id="l00946" name="l00946"></a><span class="lineno"> 946</span> <a class="code hl_enumvalue" href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca5b4357b74be0d87568036c32eb1a2e4a">_mi_option_last</a></div>
|
||||
<div class="line"><a id="l00947" name="l00947"></a><span class="lineno"><a class="line" href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca5b4357b74be0d87568036c32eb1a2e4a"> 947</a></span>} <a class="code hl_enumeration" href="group__options.html#gafebf7ed116adb38ae5218bc3ce06884c">mi_option_t</a>;</div>
|
||||
<div class="line"><a id="l00946" name="l00946"></a><span class="lineno"><a class="line" href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca5b4357b74be0d87568036c32eb1a2e4a"> 946</a></span> <a class="code hl_enumvalue" href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca5b4357b74be0d87568036c32eb1a2e4a">_mi_option_last</a></div>
|
||||
<div class="line"><a id="l00947" name="l00947"></a><span class="lineno"> 947</span>} <a class="code hl_enumeration" href="group__options.html#gafebf7ed116adb38ae5218bc3ce06884c">mi_option_t</a>;</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00948" name="l00948"></a><span class="lineno"> 948</span> </div>
|
||||
<div class="line"><a id="l00949" name="l00949"></a><span class="lineno"> 949</span> </div>
|
||||
|
@ -422,9 +424,9 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
<div class="line"><a id="l00960" name="l00960"></a><span class="lineno"><a class="line" href="group__options.html#gaf84921c32375e25754dc2ee6a911fa60"> 960</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__options.html#gaf84921c32375e25754dc2ee6a911fa60">mi_option_set</a>(<a class="code hl_enumeration" href="group__options.html#gafebf7ed116adb38ae5218bc3ce06884c">mi_option_t</a> option, <span class="keywordtype">long</span> value);</div>
|
||||
<div class="line"><a id="l00961" name="l00961"></a><span class="lineno"><a class="line" href="group__options.html#ga7ef623e440e6e5545cb08c94e71e4b90"> 961</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__options.html#ga7ef623e440e6e5545cb08c94e71e4b90">mi_option_set_default</a>(<a class="code hl_enumeration" href="group__options.html#gafebf7ed116adb38ae5218bc3ce06884c">mi_option_t</a> option, <span class="keywordtype">long</span> value);</div>
|
||||
<div class="line"><a id="l00962" name="l00962"></a><span class="lineno"> 962</span> </div>
|
||||
<div class="line"><a id="l00963" name="l00963"></a><span class="lineno"> 963</span> </div>
|
||||
<div class="line"><a id="l00965" name="l00965"></a><span class="lineno"> 965</span> </div>
|
||||
<div class="line"><a id="l00972" name="l00972"></a><span class="lineno"> 972</span> </div>
|
||||
<div class="line"><a id="l00963" name="l00963"></a><span class="lineno"> 963</span></div>
|
||||
<div class="line"><a id="l00965" name="l00965"></a><span class="lineno"> 965</span></div>
|
||||
<div class="line"><a id="l00972" name="l00972"></a><span class="lineno"> 972</span></div>
|
||||
<div class="line"><a id="l00974" name="l00974"></a><span class="lineno"><a class="line" href="group__posix.html#ga705dc7a64bffacfeeb0141501a5c35d7"> 974</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__posix.html#ga705dc7a64bffacfeeb0141501a5c35d7">mi_cfree</a>(<span class="keywordtype">void</span>* p);</div>
|
||||
<div class="line"><a id="l00975" name="l00975"></a><span class="lineno"><a class="line" href="group__posix.html#ga66bcfeb4faedbb42b796bc680821ef84"> 975</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__posix.html#ga66bcfeb4faedbb42b796bc680821ef84">mi__expand</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize);</div>
|
||||
<div class="line"><a id="l00976" name="l00976"></a><span class="lineno"> 976</span> </div>
|
||||
|
@ -444,9 +446,9 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
<div class="line"><a id="l00990" name="l00990"></a><span class="lineno"><a class="line" href="group__posix.html#ga7b82a44094fdec4d2084eb4288a979b0"> 990</a></span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* <a class="code hl_function" href="group__posix.html#ga7b82a44094fdec4d2084eb4288a979b0">mi_mbsdup</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* s);</div>
|
||||
<div class="line"><a id="l00991" name="l00991"></a><span class="lineno"><a class="line" href="group__posix.html#gab41369c1a1da7504013a7a0b1d4dd958"> 991</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="group__posix.html#gab41369c1a1da7504013a7a0b1d4dd958">mi_dupenv_s</a>(<span class="keywordtype">char</span>** buf, <span class="keywordtype">size_t</span>* size, <span class="keyword">const</span> <span class="keywordtype">char</span>* name);</div>
|
||||
<div class="line"><a id="l00992" name="l00992"></a><span class="lineno"><a class="line" href="group__posix.html#ga6ac6a6a8f3c96f1af24bb8d0439cbbd1"> 992</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="group__posix.html#ga6ac6a6a8f3c96f1af24bb8d0439cbbd1">mi_wdupenv_s</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>** buf, <span class="keywordtype">size_t</span>* size, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>* name);</div>
|
||||
<div class="line"><a id="l00993" name="l00993"></a><span class="lineno"> 993</span> </div>
|
||||
<div class="line"><a id="l00993" name="l00993"></a><span class="lineno"> 993</span></div>
|
||||
<div class="line"><a id="l00996" name="l00996"></a><span class="lineno"><a class="line" href="group__posix.html#gadfeccb72748a2f6305474a37d9d57bce"> 996</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__posix.html#gadfeccb72748a2f6305474a37d9d57bce">mi_reallocarray</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l00997" name="l00997"></a><span class="lineno"> 997</span> </div>
|
||||
<div class="line"><a id="l00997" name="l00997"></a><span class="lineno"> 997</span></div>
|
||||
<div class="line"><a id="l00999" name="l00999"></a><span class="lineno"><a class="line" href="group__posix.html#ga7e1934d60a3e697950eeb48e042bfad5"> 999</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="group__posix.html#ga7e1934d60a3e697950eeb48e042bfad5">mi_reallocarr</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l01000" name="l01000"></a><span class="lineno"> 1000</span> </div>
|
||||
<div class="line"><a id="l01001" name="l01001"></a><span class="lineno"><a class="line" href="group__posix.html#gaf82cbb4b4f24acf723348628451798d3"> 1001</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__posix.html#gaf82cbb4b4f24acf723348628451798d3">mi_aligned_recalloc</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newcount, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment);</div>
|
||||
|
@ -455,26 +457,30 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
<div class="line"><a id="l01004" name="l01004"></a><span class="lineno"><a class="line" href="group__posix.html#gae01389eedab8d67341ff52e2aad80ebb"> 1004</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__posix.html#gae01389eedab8d67341ff52e2aad80ebb">mi_free_size</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l01005" name="l01005"></a><span class="lineno"><a class="line" href="group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc"> 1005</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc">mi_free_size_aligned</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment);</div>
|
||||
<div class="line"><a id="l01006" name="l01006"></a><span class="lineno"><a class="line" href="group__posix.html#ga0d28d5cf61e6bfbb18c63092939fe5c9"> 1006</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__posix.html#ga0d28d5cf61e6bfbb18c63092939fe5c9">mi_free_aligned</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> alignment);</div>
|
||||
<div class="line"><a id="l01007" name="l01007"></a><span class="lineno"> 1007</span> </div>
|
||||
<div class="line"><a id="l01009" name="l01009"></a><span class="lineno"> 1009</span> </div>
|
||||
<div class="line"><a id="l01022" name="l01022"></a><span class="lineno"> 1022</span> </div>
|
||||
<div class="line"><a id="l01007" name="l01007"></a><span class="lineno"> 1007</span></div>
|
||||
<div class="line"><a id="l01009" name="l01009"></a><span class="lineno"> 1009</span></div>
|
||||
<div class="line"><a id="l01022" name="l01022"></a><span class="lineno"> 1022</span></div>
|
||||
<div class="line"><a id="l01024" name="l01024"></a><span class="lineno"><a class="line" href="group__cpp.html#ga633d96e3bc7011f960df9f3b2731fc6a"> 1024</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__cpp.html#ga633d96e3bc7011f960df9f3b2731fc6a">mi_new</a>(std::size_t n) <span class="keyword">noexcept</span>(<span class="keyword">false</span>);</div>
|
||||
<div class="line"><a id="l01025" name="l01025"></a><span class="lineno"> 1025</span> </div>
|
||||
<div class="line"><a id="l01025" name="l01025"></a><span class="lineno"> 1025</span></div>
|
||||
<div class="line"><a id="l01027" name="l01027"></a><span class="lineno"><a class="line" href="group__cpp.html#gadd11b85c15d21d308386844b5233856c"> 1027</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__cpp.html#gadd11b85c15d21d308386844b5233856c">mi_new_n</a>(<span class="keywordtype">size_t</span> count, <span class="keywordtype">size_t</span> size) <span class="keyword">noexcept</span>(<span class="keyword">false</span>);</div>
|
||||
<div class="line"><a id="l01028" name="l01028"></a><span class="lineno"> 1028</span> </div>
|
||||
<div class="line"><a id="l01028" name="l01028"></a><span class="lineno"> 1028</span></div>
|
||||
<div class="line"><a id="l01030" name="l01030"></a><span class="lineno"><a class="line" href="group__cpp.html#ga79c54da0b4b4ce9fcc11d2f6ef6675f8"> 1030</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__cpp.html#ga79c54da0b4b4ce9fcc11d2f6ef6675f8">mi_new_aligned</a>(std::size_t n, std::align_val_t alignment) <span class="keyword">noexcept</span>(<span class="keyword">false</span>);</div>
|
||||
<div class="line"><a id="l01031" name="l01031"></a><span class="lineno"> 1031</span> </div>
|
||||
<div class="line"><a id="l01031" name="l01031"></a><span class="lineno"> 1031</span></div>
|
||||
<div class="line"><a id="l01033" name="l01033"></a><span class="lineno"><a class="line" href="group__cpp.html#ga5cb4f120d1f7296074256215aa9a9e54"> 1033</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__cpp.html#ga5cb4f120d1f7296074256215aa9a9e54">mi_new_nothrow</a>(<span class="keywordtype">size_t</span> n);</div>
|
||||
<div class="line"><a id="l01034" name="l01034"></a><span class="lineno"> 1034</span> </div>
|
||||
<div class="line"><a id="l01034" name="l01034"></a><span class="lineno"> 1034</span></div>
|
||||
<div class="line"><a id="l01036" name="l01036"></a><span class="lineno"><a class="line" href="group__cpp.html#ga92ae00b6dd64406c7e64557711ec04b7"> 1036</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__cpp.html#ga92ae00b6dd64406c7e64557711ec04b7">mi_new_aligned_nothrow</a>(<span class="keywordtype">size_t</span> n, <span class="keywordtype">size_t</span> alignment);</div>
|
||||
<div class="line"><a id="l01037" name="l01037"></a><span class="lineno"> 1037</span> </div>
|
||||
<div class="line"><a id="l01037" name="l01037"></a><span class="lineno"> 1037</span></div>
|
||||
<div class="line"><a id="l01039" name="l01039"></a><span class="lineno"><a class="line" href="group__cpp.html#ga6867d89baf992728e0cc20a1f47db4d0"> 1039</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__cpp.html#ga6867d89baf992728e0cc20a1f47db4d0">mi_new_realloc</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newsize);</div>
|
||||
<div class="line"><a id="l01040" name="l01040"></a><span class="lineno"> 1040</span> </div>
|
||||
<div class="line"><a id="l01040" name="l01040"></a><span class="lineno"> 1040</span></div>
|
||||
<div class="line"><a id="l01042" name="l01042"></a><span class="lineno"><a class="line" href="group__cpp.html#gaace912ce086682d56f3ce9f7638d9d67"> 1042</a></span><span class="keywordtype">void</span>* <a class="code hl_function" href="group__cpp.html#gaace912ce086682d56f3ce9f7638d9d67">mi_new_reallocn</a>(<span class="keywordtype">void</span>* p, <span class="keywordtype">size_t</span> newcount, <span class="keywordtype">size_t</span> size);</div>
|
||||
<div class="line"><a id="l01043" name="l01043"></a><span class="lineno"> 1043</span> </div>
|
||||
<div class="line"><a id="l01043" name="l01043"></a><span class="lineno"> 1043</span></div>
|
||||
<div class="line"><a id="l01051" name="l01051"></a><span class="lineno"><a class="line" href="group__cpp.html"> 1051</a></span><span class="keyword">template</span><<span class="keyword">class</span> T> <span class="keyword">struct </span><a class="code hl_struct" href="group__cpp.html#structmi__stl__allocator">mi_stl_allocator</a> { }</div>
|
||||
<div class="line"><a id="l01052" name="l01052"></a><span class="lineno"> 1052</span> </div>
|
||||
<div class="line"><a id="l01054" name="l01054"></a><span class="lineno"> 1054</span> </div>
|
||||
<div class="line"><a id="l01052" name="l01052"></a><span class="lineno"> 1052</span></div>
|
||||
<div class="line"><a id="l01054" name="l01054"></a><span class="lineno"> 1054</span></div>
|
||||
<div class="line"><a id="l01113" name="l01113"></a><span class="lineno"> 1113</span></div>
|
||||
<div class="line"><a id="l01198" name="l01198"></a><span class="lineno"> 1198</span></div>
|
||||
<div class="line"><a id="l01263" name="l01263"></a><span class="lineno"> 1263</span></div>
|
||||
<div class="line"><a id="l01433" name="l01433"></a><span class="lineno"> 1433</span></div>
|
||||
<div class="ttc" id="agroup__aligned_html_ga2022f71b95a7cd6cce1b6e07752ae8ca"><div class="ttname"><a href="group__aligned.html#ga2022f71b95a7cd6cce1b6e07752ae8ca">mi_malloc_aligned_at</a></div><div class="ttdeci">void * mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset)</div><div class="ttdoc">Allocate size bytes aligned by alignment at a specified offset.</div></div>
|
||||
<div class="ttc" id="agroup__aligned_html_ga424ef386fb1f9f8e0a86ab53f16eaaf1"><div class="ttname"><a href="group__aligned.html#ga424ef386fb1f9f8e0a86ab53f16eaaf1">mi_calloc_aligned</a></div><div class="ttdeci">void * mi_calloc_aligned(size_t count, size_t size, size_t alignment)</div></div>
|
||||
<div class="ttc" id="agroup__aligned_html_ga5d7a46d054b4d7abe9d8d2474add2edf"><div class="ttname"><a href="group__aligned.html#ga5d7a46d054b4d7abe9d8d2474add2edf">mi_realloc_aligned</a></div><div class="ttdeci">void * mi_realloc_aligned(void *p, size_t newsize, size_t alignment)</div></div>
|
||||
|
@ -538,7 +544,7 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
<div class="ttc" id="agroup__extended_html_gaaf2d9976576d5efd5544be12848af949"><div class="ttname"><a href="group__extended.html#gaaf2d9976576d5efd5544be12848af949">mi_heap_new_in_arena</a></div><div class="ttdeci">mi_heap_t * mi_heap_new_in_arena(mi_arena_id_t arena_id)</div><div class="ttdoc">Create a new heap that only allocates in the specified arena.</div></div>
|
||||
<div class="ttc" id="agroup__extended_html_gab1dac8476c46cb9eecab767eb40c1525"><div class="ttname"><a href="group__extended.html#gab1dac8476c46cb9eecab767eb40c1525">mi_thread_stats_print_out</a></div><div class="ttdeci">void mi_thread_stats_print_out(mi_output_fun *out, void *arg)</div><div class="ttdoc">Print out heap statistics for this thread.</div></div>
|
||||
<div class="ttc" id="agroup__extended_html_gac057927cd06c854b45fe7847e921bd47"><div class="ttname"><a href="group__extended.html#gac057927cd06c854b45fe7847e921bd47">mi_good_size</a></div><div class="ttdeci">size_t mi_good_size(size_t size)</div><div class="ttdoc">Return the used allocation size.</div></div>
|
||||
<div class="ttc" id="agroup__extended_html_gad7439207f8f71fb6c382a9ea20b997e7"><div class="ttname"><a href="group__extended.html#gad7439207f8f71fb6c382a9ea20b997e7">mi_debug_show_arenas</a></div><div class="ttdeci">void mi_debug_show_arenas(bool show_inuse, bool show_abandoned, bool show_purge)</div><div class="ttdoc">Show all current arena's.</div></div>
|
||||
<div class="ttc" id="agroup__extended_html_gad7439207f8f71fb6c382a9ea20b997e7"><div class="ttname"><a href="group__extended.html#gad7439207f8f71fb6c382a9ea20b997e7">mi_debug_show_arenas</a></div><div class="ttdeci">void mi_debug_show_arenas(bool show_inuse, bool show_abandoned, bool show_purge)</div><div class="ttdoc">Show all current arena's.</div></div>
|
||||
<div class="ttc" id="agroup__extended_html_gadbc53414eb68b275588ec001ce1ddc7c"><div class="ttname"><a href="group__extended.html#gadbc53414eb68b275588ec001ce1ddc7c">mi_subproc_add_current_thread</a></div><div class="ttdeci">void mi_subproc_add_current_thread(mi_subproc_id_t subproc)</div><div class="ttdoc">Add the current thread to the given sub-process.</div></div>
|
||||
<div class="ttc" id="agroup__extended_html_gadf31cea7d0332a81c8b882cbbdbadb8d"><div class="ttname"><a href="group__extended.html#gadf31cea7d0332a81c8b882cbbdbadb8d">mi_output_fun</a></div><div class="ttdeci">void mi_output_fun(const char *msg, void *arg)</div><div class="ttdoc">Type of output functions.</div><div class="ttdef"><b>Definition</b> mimalloc-doc.h:378</div></div>
|
||||
<div class="ttc" id="agroup__extended_html_gae5b17ff027cd2150b43a33040250cf3f"><div class="ttname"><a href="group__extended.html#gae5b17ff027cd2150b43a33040250cf3f">mi_register_output</a></div><div class="ttdeci">void mi_register_output(mi_output_fun *out, void *arg)</div><div class="ttdoc">Register an output function.</div></div>
|
||||
|
@ -617,7 +623,7 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
<div class="ttc" id="agroup__options_html_ggafebf7ed116adb38ae5218bc3ce06884caca7ed041be3b0b9d0b82432c7bf41af2"><div class="ttname"><a href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caca7ed041be3b0b9d0b82432c7bf41af2">mi_option_reserve_huge_os_pages</a></div><div class="ttdeci">@ mi_option_reserve_huge_os_pages</div><div class="ttdoc">reserve N huge OS pages (1GiB pages) at startup</div><div class="ttdef"><b>Definition</b> mimalloc-doc.h:920</div></div>
|
||||
<div class="ttc" id="agroup__options_html_ggafebf7ed116adb38ae5218bc3ce06884cadcfb5a09580361b1be65901d2d812de6"><div class="ttname"><a href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cadcfb5a09580361b1be65901d2d812de6">mi_option_disallow_os_alloc</a></div><div class="ttdeci">@ mi_option_disallow_os_alloc</div><div class="ttdoc">1 = do not use OS memory for allocation (but only programmatically reserved arenas)</div><div class="ttdef"><b>Definition</b> mimalloc-doc.h:936</div></div>
|
||||
<div class="ttc" id="agroup__options_html_ggafebf7ed116adb38ae5218bc3ce06884cadd351e615acd8563529c20a347be7290"><div class="ttname"><a href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cadd351e615acd8563529c20a347be7290">mi_option_purge_delay</a></div><div class="ttdeci">@ mi_option_purge_delay</div><div class="ttdoc">memory purging is delayed by N milli seconds; use 0 for immediate purging or -1 for no purging at all...</div><div class="ttdef"><b>Definition</b> mimalloc-doc.h:934</div></div>
|
||||
<div class="ttc" id="agroup__options_html_ggafebf7ed116adb38ae5218bc3ce06884caeae1696100e4057ffc4182730cc04e40"><div class="ttname"><a href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caeae1696100e4057ffc4182730cc04e40">mi_option_disallow_arena_alloc</a></div><div class="ttdeci">@ mi_option_disallow_arena_alloc</div><div class="ttdoc">1 = do not use arena's for allocation (except if using specific arena id's)</div><div class="ttdef"><b>Definition</b> mimalloc-doc.h:943</div></div>
|
||||
<div class="ttc" id="agroup__options_html_ggafebf7ed116adb38ae5218bc3ce06884caeae1696100e4057ffc4182730cc04e40"><div class="ttname"><a href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caeae1696100e4057ffc4182730cc04e40">mi_option_disallow_arena_alloc</a></div><div class="ttdeci">@ mi_option_disallow_arena_alloc</div><div class="ttdoc">1 = do not use arena's for allocation (except if using specific arena id's)</div><div class="ttdef"><b>Definition</b> mimalloc-doc.h:943</div></div>
|
||||
<div class="ttc" id="agroup__options_html_ggafebf7ed116adb38ae5218bc3ce06884caec6ecbe29d46a48205ed8823a8a52a6a"><div class="ttname"><a href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caec6ecbe29d46a48205ed8823a8a52a6a">mi_option_max_errors</a></div><div class="ttdeci">@ mi_option_max_errors</div><div class="ttdoc">issue at most N error messages</div><div class="ttdef"><b>Definition</b> mimalloc-doc.h:916</div></div>
|
||||
<div class="ttc" id="agroup__options_html_ggafebf7ed116adb38ae5218bc3ce06884caf9595921087e942602ee079158762665"><div class="ttname"><a href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caf9595921087e942602ee079158762665">mi_option_max_warnings</a></div><div class="ttdeci">@ mi_option_max_warnings</div><div class="ttdoc">issue at most N warning messages</div><div class="ttdef"><b>Definition</b> mimalloc-doc.h:917</div></div>
|
||||
<div class="ttc" id="agroup__options_html_ggafebf7ed116adb38ae5218bc3ce06884cafbf4822e5c00732c5984b32a032837f0"><div class="ttname"><a href="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafbf4822e5c00732c5984b32a032837f0">mi_option_show_errors</a></div><div class="ttdeci">@ mi_option_show_errors</div><div class="ttdoc">Print error messages.</div><div class="ttdef"><b>Definition</b> mimalloc-doc.h:913</div></div>
|
||||
|
@ -662,7 +668,7 @@ $(function(){initNavTree('mimalloc-doc_8h_source.html',''); initResizable(true);
|
|||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><b>mimalloc-doc.h</b></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -122,9 +122,9 @@ function initNavTree(toroot,relpath) {
|
|||
if (ancParent.hasClass('memItemLeft') || ancParent.hasClass('memtitle') ||
|
||||
ancParent.hasClass('fieldname') || ancParent.hasClass('fieldtype') ||
|
||||
ancParent.is(':header')) {
|
||||
pos = ancParent.position().top;
|
||||
pos = ancParent.offset().top;
|
||||
} else if (anchor.position()) {
|
||||
pos = anchor.position().top;
|
||||
pos = anchor.offset().top;
|
||||
}
|
||||
if (pos) {
|
||||
const dcOffset = docContent.offset().top;
|
||||
|
|
|
@ -47,5 +47,5 @@ var NAVTREEINDEX =
|
|||
"annotated.html"
|
||||
];
|
||||
|
||||
var SYNCONMSG = 'click to disable panel synchronisation';
|
||||
var SYNCOFFMSG = 'click to enable panel synchronisation';
|
||||
var SYNCONMSG = 'click to disable panel synchronization';
|
||||
var SYNCOFFMSG = 'click to enable panel synchronization';
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Overriding Malloc</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -118,16 +118,16 @@ $(function(){initNavTree('overrides.html',''); initResizable(true); });
|
|||
<p>On macOS we can also preload the mimalloc shared library so all calls to the standard <code>malloc</code> interface are resolved to the <em>mimalloc</em> library. </p><div class="fragment"><div class="line">> env DYLD_INSERT_LIBRARIES=/usr/lib/libmimalloc.dylib myprogram</div>
|
||||
</div><!-- fragment --><p>Note that certain security restrictions may apply when doing this from the <a href="https://stackoverflow.com/questions/43941322/dyld-insert-libraries-ignored-when-calling-application-through-bash">shell</a>.</p>
|
||||
<h3>Dynamic Override on Windows</h3>
|
||||
<p><span id="override_on_windows">Dynamically overriding on mimalloc on Windows</span> is robust and has the particular advantage to be able to redirect all malloc/free calls that go through the (dynamic) C runtime allocator, including those from other DLL's or libraries. As it intercepts all allocation calls on a low level, it can be used reliably on large programs that include other 3rd party components. There are four requirements to make the overriding work robustly:</p>
|
||||
<p><span id="override_on_windows">Dynamically overriding on mimalloc on Windows</span> is robust and has the particular advantage to be able to redirect all malloc/free calls that go through the (dynamic) C runtime allocator, including those from other DLL's or libraries. As it intercepts all allocation calls on a low level, it can be used reliably on large programs that include other 3rd party components. There are four requirements to make the overriding work well:</p>
|
||||
<ol type="1">
|
||||
<li>Use the C-runtime library as a DLL (using the <code>/MD</code> or <code>/MDd</code> switch).</li>
|
||||
<li>Link your program explicitly with <code>mimalloc-override.dll</code> library. To ensure the <code>mimalloc-override.dll</code> is loaded at run-time it is easiest to insert some call to the mimalloc API in the <code>main</code> function, like <code>mi_version()</code> (or use the <code>/INCLUDE:mi_version</code> switch on the linker). See the <code>mimalloc-override-test</code> project for an example on how to use this.</li>
|
||||
<li>The [<code>mimalloc-redirect.dll</code>](bin) (or <code>mimalloc-redirect32.dll</code>) must be put in the same folder as the main <code>mimalloc-override.dll</code> at runtime (as it is a dependency of that DLL). The redirection DLL ensures that all calls to the C runtime malloc API get redirected to mimalloc functions (which reside in <code>mimalloc-override.dll</code>).</li>
|
||||
<li>Ensure the <code>mimalloc-override.dll</code> comes as early as possible in the import list of the final executable (so it can intercept all potential allocations).</li>
|
||||
<li>Link your program explicitly with the <code>mimalloc.lib</code> export library for the <code>mimalloc.dll</code>. (which must be compiled with <code>-DMI_OVERRIDE=ON</code>, which is the default though). To ensure the <code>mimalloc.dll</code> is actually loaded at run-time it is easiest to insert some call to the mimalloc API in the <code>main</code> function, like <code>mi_version()</code> (or use the <code>/include:mi_version</code> switch on the linker command, or similarly, <code>#pragma comment(linker, "/include:mi_version")</code> in some source file). See the <code>mimalloc-test-override</code> project for an example on how to use this.</li>
|
||||
<li>The <code>mimalloc-redirect.dll</code> must be put in the same directory as the main <code>mimalloc.dll</code> at runtime (as it is a dependency of that DLL). The redirection DLL ensures that all calls to the C runtime malloc API get redirected to mimalloc functions (which reside in <code>mimalloc.dll</code>).</li>
|
||||
<li>Ensure the <code>mimalloc.dll</code> comes as early as possible in the import list of the final executable (so it can intercept all potential allocations). You can use <code>minject -l <exe></code> to check this if needed.</li>
|
||||
</ol>
|
||||
<p>For best performance on Windows with C++, it is also recommended to also override the <code>new</code>/<code>delete</code> operations (by including <a href="include/mimalloc-new-delete.h"><code>mimalloc-new-delete.h</code></a> a single(!) source file in your project).</p>
|
||||
<p>The environment variable <code>MIMALLOC_DISABLE_REDIRECT=1</code> can be used to disable dynamic overriding at run-time. Use <code>MIMALLOC_VERBOSE=1</code> to check if mimalloc was successfully redirected.</p>
|
||||
<p>We cannot always re-link an executable with <code>mimalloc-override.dll</code>, and similarly, we cannot always ensure the the DLL comes first in the import table of the final executable. In many cases though we can patch existing executables without any recompilation if they are linked with the dynamic C runtime (<code>ucrtbase.dll</code>) – just put the <code>mimalloc-override.dll</code> into the import table (and put <code>mimalloc-redirect.dll</code> in the same folder) Such patching can be done for example with <a href="https://ntcore.com/?page_id=388">CFF Explorer</a> or the [<code>minject</code>](bin) program.</p>
|
||||
<p>For different platforms than x64, you may need a specific [redirection dll](bin). Furthermore, we cannot always re-link an executable or ensure <code>mimalloc.dll</code> comes first in the import table. In such cases the [<code>minject</code>](bin) tool can be used to patch the executable's import tables.</p>
|
||||
<h2>Static override</h2>
|
||||
<p>On Unix-like systems, you can also statically link with <em>mimalloc</em> to override the standard malloc interface. The recommended way is to link the final program with the <em>mimalloc</em> single object file (<code>mimalloc.o</code>). We use an object file instead of a library file as linkers give preference to that over archives to resolve symbols. To ensure that the standard malloc interface resolves to the <em>mimalloc</em> library, link it as the first object file. For example: </p><div class="fragment"><div class="line">> gcc -o myprogram mimalloc.o myfile1.c ...</div>
|
||||
</div><!-- fragment --><p>Another way to override statically that works on all platforms, is to link statically to mimalloc (as shown in the introduction) and include a header file in each source file that re-defines <code>malloc</code> etc. to <code>mi_malloc</code>. This is provided by <a href="https://github.com/microsoft/mimalloc/blob/master/include/mimalloc-override.h"><code>mimalloc-override.h</code></a>. This only works reliably though if all sources are under your control or otherwise mixing of pointers from different heaps may occur!</p>
|
||||
|
@ -198,7 +198,7 @@ $(function(){initNavTree('overrides.html',''); initResizable(true); });
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Related Pages</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -121,7 +121,7 @@ $(function(){initNavTree('pages.html',''); initResizable(true); });
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -139,7 +139,9 @@ function initResizable(treeview) {
|
|||
{
|
||||
$("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault);
|
||||
$(".ui-resizable-handle").dblclick(collapseExpand);
|
||||
// workaround for firefox
|
||||
$("body").css({overflow: "hidden"});
|
||||
}
|
||||
$(window).on('load',resizeHeight);
|
||||
$(window).on('load',function() { resizeHeight(treeview); });
|
||||
}
|
||||
/* @license-end */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.11.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mi-malloc: Using the library</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.11.0 -->
|
||||
<!-- Generated by Doxygen 1.13.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
|
@ -114,7 +114,7 @@ $(function(){initNavTree('using.html',''); initResizable(true); });
|
|||
</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.</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.</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>
|
||||
|
@ -157,7 +157,7 @@ $(function(){initNavTree('using.html',''); initResizable(true); });
|
|||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -211,7 +211,7 @@ static inline void mi_prim_tls_slot_set(size_t slot, void* value) mi_attr_noexce
|
|||
// thread-local initialization checks in the fast path. This uses a fixed location
|
||||
// in the TCB though (last user-reserved slot by default) which may clash with other applications.
|
||||
|
||||
#define MI_HAS_TLS_SLOT 2 // 2 = we can reliable initialize the slot (saving a test on each malloc)
|
||||
#define MI_HAS_TLS_SLOT 2 // 2 = we can reliably initialize the slot (saving a test on each malloc)
|
||||
|
||||
#if MI_WIN_USE_FIXED_TLS > 1
|
||||
#define MI_TLS_SLOT (MI_WIN_USE_FIXED_TLS)
|
||||
|
|
76
readme.md
76
readme.md
|
@ -12,8 +12,8 @@ is a general purpose allocator with excellent [performance](#performance) charac
|
|||
Initially developed by Daan Leijen for the runtime systems of the
|
||||
[Koka](https://koka-lang.github.io) and [Lean](https://github.com/leanprover/lean) languages.
|
||||
|
||||
Latest release tag: `v2.1.7` (2024-05-21).
|
||||
Latest v1 tag: `v1.8.7` (2024-05-21).
|
||||
Latest release tag: `v2.1.8` (2025-01-03).
|
||||
Latest v1 tag: `v1.8.8` (2024-01-03).
|
||||
|
||||
mimalloc is a drop-in replacement for `malloc` and can be used in other programs
|
||||
without code changes, for example, on dynamically linked ELF-based systems (Linux, BSD, etc.) you can use it as:
|
||||
|
@ -22,7 +22,7 @@ without code changes, for example, on dynamically linked ELF-based systems (Linu
|
|||
```
|
||||
It also includes a robust way to override the default allocator in [Windows](#override_on_windows). Notable aspects of the design include:
|
||||
|
||||
- __small and consistent__: the library is about 8k LOC using simple and
|
||||
- __small and consistent__: the library is about 10k LOC using simple and
|
||||
consistent data structures. This makes it very suitable
|
||||
to integrate and adapt in other projects. For runtime systems it
|
||||
provides hooks for a monotonic _heartbeat_ and deferred freeing (for
|
||||
|
@ -70,18 +70,23 @@ Enjoy!
|
|||
|
||||
### Branches
|
||||
|
||||
* `master`: latest stable release (based on `dev-slice`).
|
||||
* `master`: latest stable release (based on `dev2`).
|
||||
* `dev`: development branch for mimalloc v1. Use this branch for submitting PR's.
|
||||
* `dev-slice`: development branch for mimalloc v2. This branch is downstream of `dev` (and is essentially equal to `dev` except for
|
||||
`src/segment.c`)
|
||||
* `dev2`: development branch for mimalloc v2. This branch is downstream of `dev`
|
||||
(and is essentially equal to `dev` except for `src/segment.c`). Uses larger sliced segments to manage
|
||||
mimalloc pages what can reduce fragmentation.
|
||||
* `dev3`: development branch for mimalloc v3-alpha. This branch is downstream of `dev`. This is still experimental,
|
||||
but simplifies previous versions by having no segments any more. This improves sharing of memory
|
||||
between threads, and on certain large workloads uses less memory with less fragmentation.
|
||||
|
||||
### Releases
|
||||
|
||||
Note: the `v2.x` version has a different algorithm for managing internal mimalloc pages (as slices) that tends to use reduce
|
||||
memory usage
|
||||
and fragmentation compared to mimalloc `v1.x` (especially for large workloads). Should otherwise have similar performance
|
||||
(see [below](#performance)); please report if you observe any significant performance regression.
|
||||
|
||||
* 2025-01-03, `v1.8.8`, `v2.1.8`, `v3.0-alpha`: Interim release. Support Windows arm64. New guarded build that can place OS
|
||||
guard pages behind objects to catch buffer overflows as they occur.
|
||||
Many small fixes: build on Windows arm64, cygwin, riscV, and dragonfly; fix Windows static library initialization to account for
|
||||
thread local destructors (in Rust/C++); macOS tag change; macOS TLS slot fix; improve stats;
|
||||
consistent mimalloc.dll on Windows (instead of mimalloc-override.dll); fix mimalloc-redirect on Win11 H2;
|
||||
add 0-byte to canary; upstream CPython fixes; reduce .bss size; allow fixed TLS slot on Windows for improved performance.
|
||||
* 2024-05-21, `v1.8.7`, `v2.1.7`: Fix build issues on less common platforms. Started upstreaming patches
|
||||
from the CPython [integration](https://github.com/python/cpython/issues/113141#issuecomment-2119255217). Upstream `vcpkg` patches.
|
||||
* 2024-05-13, `v1.8.6`, `v2.1.6`: Fix build errors on various (older) platforms. Refactored aligned allocation.
|
||||
|
@ -166,7 +171,7 @@ in the entire program.
|
|||
|
||||
## Linux, macOS, BSD, etc.
|
||||
|
||||
We use [`cmake`](https://cmake.org)<sup>1</sup> as the build system:
|
||||
We use [`cmake`](https://cmake.org) as the build system:
|
||||
|
||||
```
|
||||
> mkdir -p out/release
|
||||
|
@ -189,34 +194,39 @@ maintains detailed statistics as:
|
|||
> cmake -DCMAKE_BUILD_TYPE=Debug ../..
|
||||
> make
|
||||
```
|
||||
|
||||
This will name the shared library as `libmimalloc-debug.so`.
|
||||
|
||||
Finally, you can build a _secure_ version that uses guard pages, encrypted
|
||||
free lists, etc., as:
|
||||
Finally, you can build a _secure_ version that uses guard pages, encrypted free lists, etc., as:
|
||||
|
||||
```
|
||||
> mkdir -p out/secure
|
||||
> cd out/secure
|
||||
> cmake -DMI_SECURE=ON ../..
|
||||
> make
|
||||
```
|
||||
|
||||
This will name the shared library as `libmimalloc-secure.so`.
|
||||
Use `cmake ../.. -LH` to see all the available build options.
|
||||
|
||||
The examples use the default compiler. If you like to use another, use:
|
||||
|
||||
```
|
||||
> CC=clang CXX=clang++ cmake ../..
|
||||
```
|
||||
|
||||
## Cmake with Visual Studio
|
||||
|
||||
You can also use cmake on Windows. Open a Visual Studio development prompt
|
||||
You can also use cmake on Windows. Open a Visual Studio 2022 development prompt
|
||||
and invoke `cmake` with the right [generator](https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2017%202022.html)
|
||||
and architecture, like:
|
||||
|
||||
```
|
||||
> cmake ..\.. -G "Visual Studio 17 2022" -A x64 -DMI_OVERRIDE=ON
|
||||
```
|
||||
|
||||
The cmake build type is specified when actually building, for example:
|
||||
|
||||
```
|
||||
> cmake --build . --config=Release
|
||||
```
|
||||
|
@ -239,7 +249,7 @@ mimalloc uses only safe OS calls (`mmap` and `VirtualAlloc`) and can co-exist
|
|||
with other allocators linked to the same program.
|
||||
If you use `cmake`, you can simply use:
|
||||
```
|
||||
find_package(mimalloc 1.4 REQUIRED)
|
||||
find_package(mimalloc 1.8 REQUIRED)
|
||||
```
|
||||
in your `CMakeLists.txt` to find a locally installed mimalloc. Then use either:
|
||||
```
|
||||
|
@ -380,13 +390,39 @@ As always, evaluate with care as part of an overall security strategy as all of
|
|||
|
||||
## Debug Mode
|
||||
|
||||
When _mimalloc_ is built using debug mode, various checks are done at runtime to catch development errors.
|
||||
When _mimalloc_ is built using debug mode, (`-DCMAKE_BUILD_TYPE=Debug`),
|
||||
various checks are done at runtime to catch development errors.
|
||||
|
||||
- Statistics are maintained in detail for each object size. They can be shown using `MIMALLOC_SHOW_STATS=1` at runtime.
|
||||
- All objects have padding at the end to detect (byte precise) heap block overflows.
|
||||
- Double free's, and freeing invalid heap pointers are detected.
|
||||
- Corrupted free-lists and some forms of use-after-free are detected.
|
||||
|
||||
## Guarded Mode
|
||||
|
||||
<span id="guarded">_mimalloc_ can be build in guarded mode using the `-DMI_GUARDED=ON` flags in `cmake`.</span>
|
||||
This enables placing OS guard pages behind certain object allocations to catch buffer overflows as they occur.
|
||||
This can be invaluable to catch buffer-overflow bugs in large programs. However, it also means that any object
|
||||
allocated with a guard page takes at least 8 KiB memory for the guard page and its alignment. As such, allocating
|
||||
a guard page for every allocation may be too expensive both in terms of memory, and in terms of performance with
|
||||
many system calls. Therefore, there are various environment variables (and options) to tune this:
|
||||
|
||||
- `MIMALLOC_GUARDED_SAMPLE_RATE=N`: Set the sample rate to `N` (by default 4000). This mode places a guard page
|
||||
behind every `N` suitable object allocations (per thread). Since the performance in guarded mode without placing
|
||||
guard pages is close to release mode, this can be used to enable guard pages even in production to catch latent
|
||||
buffer overflow bugs. Set the sample rate to `1` to guard every object, and to `0` to place no guard pages at all.
|
||||
|
||||
- `MIMALLOC_GUARDED_SAMPLE_SEED=N`: Start sampling at `N` (by default random). Can be used to reproduce a buffer
|
||||
overflow if needed.
|
||||
|
||||
- `MIMALLOC_GUARDED_MIN=N`, `MIMALLOC_GUARDED_MAX=N`: Minimal and maximal _rounded_ object sizes for which a guard
|
||||
page is considered (`0` and `1GiB` respectively). If you suspect a buffer overflow occurs with an object of size
|
||||
141, set the minimum and maximum to `148` and the sample rate to `1` to have all of those guarded.
|
||||
|
||||
- `MIMALLOC_GUARDED_PRECISE=1`: If we have an object of size 13, we would usually place it an aligned 16 bytes in
|
||||
front of the guard page. Using `MIMALLOC_GUARDED_PRECISE` places it exactly 13 bytes before a page so that even
|
||||
a 1 byte overflow is detected. This violates the C/C++ minimal alignment guarantees though so use with care.
|
||||
|
||||
|
||||
# Overriding Standard Malloc
|
||||
|
||||
|
@ -447,7 +483,7 @@ There are four requirements to make the overriding work well:
|
|||
similarly, `#pragma comment(linker, "/include:mi_version")` in some source file).
|
||||
See the `mimalloc-test-override` project for an example on how to use this.
|
||||
|
||||
3. The `mimalloc-redirect.dll` must be put in the same folder as the main
|
||||
3. The `mimalloc-redirect.dll` must be put in the same directory as the main
|
||||
`mimalloc.dll` at runtime (as it is a dependency of that DLL).
|
||||
The redirection DLL ensures that all calls to the C runtime malloc API get
|
||||
redirected to mimalloc functions (which reside in `mimalloc.dll`).
|
||||
|
@ -480,6 +516,7 @@ an object file instead of a library file as linkers give preference to
|
|||
that over archives to resolve symbols. To ensure that the standard
|
||||
malloc interface resolves to the _mimalloc_ library, link it as the first
|
||||
object file. For example:
|
||||
|
||||
```
|
||||
> gcc -o myprogram mimalloc.o myfile1.c ...
|
||||
```
|
||||
|
@ -487,7 +524,8 @@ object file. For example:
|
|||
Another way to override statically that works on all platforms, is to
|
||||
link statically to mimalloc (as shown in the introduction) and include a
|
||||
header file in each source file that re-defines `malloc` etc. to `mi_malloc`.
|
||||
This is provided by [`mimalloc-override.h`](include/mimalloc-override.h). This only works reliably though if all sources are
|
||||
This is provided by [`mimalloc-override.h`](include/mimalloc-override.h). This only works
|
||||
reliably though if all sources are
|
||||
under your control or otherwise mixing of pointers from different heaps may occur!
|
||||
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ typedef struct mi_option_desc_s {
|
|||
#endif
|
||||
|
||||
#ifndef MI_DEFAULT_ALLOW_LARGE_OS_PAGES
|
||||
#define MI_DEFAULT_ALLOW_LARGE_OS_PAGES 0
|
||||
#define MI_DEFAULT_ALLOW_LARGE_OS_PAGES 1
|
||||
#endif
|
||||
|
||||
#ifndef MI_DEFAULT_RESERVE_HUGE_OS_PAGES
|
||||
|
@ -143,7 +143,7 @@ static mi_option_desc_t options[_mi_option_last] =
|
|||
{ MI_DEFAULT_ARENA_RESERVE, UNINIT, MI_OPTION(arena_reserve) }, // reserve memory N KiB at a time (=1GiB) (use `option_get_size`)
|
||||
{ 10, UNINIT, MI_OPTION(arena_purge_mult) }, // purge delay multiplier for arena's
|
||||
{ 1, UNINIT, MI_OPTION_LEGACY(purge_extend_delay, decommit_extend_delay) },
|
||||
{ 1, UNINIT, MI_OPTION(abandoned_reclaim_on_free) },// reclaim an abandoned segment on a free
|
||||
{ 0, UNINIT, MI_OPTION(abandoned_reclaim_on_free) },// reclaim an abandoned segment on a free
|
||||
{ MI_DEFAULT_DISALLOW_ARENA_ALLOC, UNINIT, MI_OPTION(disallow_arena_alloc) }, // 1 = do not use arena's for allocation (except if using specific arena id's)
|
||||
{ 400, UNINIT, MI_OPTION(retry_on_oom) }, // windows only: retry on out-of-memory for N milli seconds (=400), set to 0 to disable retries.
|
||||
#if defined(MI_VISIT_ABANDONED)
|
||||
|
|
Loading…
Add table
Reference in a new issue