diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 000000000..97489cb60 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + groups: + minor-and-patch: + patterns: ["*"] + update-types: ["minor", "patch"] \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b82b8199c..a65308a6c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,7 +9,7 @@ permissions: contents: write env: - RELEASE: Release v3.5.0 + RELEASE: Release v3.5.1 FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true name: Release @@ -19,14 +19,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - branch: [v3.5.0, v2.5.0, v1.15.0] # [dev,dev2,dev3] + branch: [v3.5.1, v2.5.1, v1.15.1] # [dev,dev2,dev3] # we build on the oldest ubuntu version for better binary compatibility. os: [windows-latest, macOS-latest, macos-15-intel, ubuntu-22.04, ubuntu-22.04-arm] steps: # Checkout: https://github.com/actions/checkout - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: ref: ${{ matrix.branch }} fetch-tags: true @@ -45,7 +45,7 @@ jobs: # Create a release: https://github.com/softprops/action-gh-release (MIT license) - name: Release - uses: softprops/action-gh-release@v3 + uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2 if: ${{ env.RELEASE != '' && env.RELEASE != 'no' }} with: name: ${{ env.RELEASE }} diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index fda392a10..71a91a887 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -11,7 +11,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/stale@v10 + - uses: actions/stale@1e223db275d687790206a7acac4d1a11bd6fe629 # v10.4.0 with: days-before-issue-stale: 360 days-before-issue-close: 14 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 837a9300d..d95821599 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,14 +17,22 @@ jobs: runs-on: ${{ matrix.os }} env: MIMALLOC_SHOW_ERRORS: 1 + continue-on-error: + ${{ startsWith(matrix.tests,'alpine') || false }} strategy: + fail-fast: false matrix: tests: [basic,extra] os: [windows-latest, macos-latest, ubuntu-latest, macos-14, macos-15-intel, ubuntu-22.04-arm, windows-11-arm] + c_or_cxx: [c, cxx] exclude: - os: macos-14 tests: extra + - c_or_cxx: cxx + tests: extra include: + - os: ubuntu-latest + tests: tsan - os: ubuntu-latest tests: freebsd-x64 - os: ubuntu-latest @@ -35,6 +43,10 @@ jobs: tests: alpine-arm32 # qemu - os: windows-latest tests: mingw-ucrt64 + - os: windows-latest # clang-cl and clang + tests: clang + - os: windows-11-arm # clang-cl and clang + tests: clang # - os: ubuntu-latest # tests: android-x64 # - os: ubuntu-latest # slow, so disable by default @@ -43,92 +55,115 @@ jobs: steps: # Checkout: https://github.com/actions/checkout - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 - # Basic - - name: Debug - if: matrix.tests == 'basic' + # Choose MI_USE_CXX setting + - name: Set default cmake options + id: cmake_args + shell: bash run: | - env - cmake . -B out/debug -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL - cmake --build out/debug --parallel 4 --config Debug - ctest --test-dir out/debug --verbose --timeout 240 -C Debug + if [ "${{ matrix.c_or_cxx }}" = "cxx" ]; then + echo "CMAKE_CXX_OPT_DEFAULT=-DMI_USE_CXX=ON" >> $GITHUB_OUTPUT + else # Default to C mode + echo "CMAKE_CXX_OPT_DEFAULT=-DMI_USE_CXX=OFF" >> $GITHUB_OUTPUT + fi + # Basic - name: Release if: matrix.tests == 'basic' run: | - cmake . -B out/release -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_SEE_ASM=ON - cmake --build out/release --parallel 4 --config Release - ctest --test-dir out/release --verbose --timeout 240 -C Release + cmake . -B out/release-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_SEE_ASM=ON ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_DEFAULT }} + cmake --build out/release-${{ matrix.c_or_cxx }} --parallel 4 --config Release + ctest --test-dir out/release-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release - name: Release, Asm if: matrix.tests == 'basic' && runner.os == 'Linux' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: ${{ matrix.os }}-asm - path: out/release/CMakeFiles/mimalloc-static.dir/src/*.c.s + name: ${{ matrix.os }}-${{ matrix.c_or_cxx }}-asm + path: out/release-${{ matrix.c_or_cxx }}/CMakeFiles/mimalloc-static.dir/src/*.s + - name: Debug + if: matrix.tests == 'basic' + run: | + env + cmake . -B out/debug-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_DEFAULT }} + cmake --build out/debug-${{ matrix.c_or_cxx }} --parallel 4 --config Debug + ctest --test-dir out/debug-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Debug - name: Secure if: matrix.tests == 'basic' run: | - cmake . -B out/secure -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON - cmake --build out/secure --parallel 4 --config Release - ctest --test-dir out/secure --verbose --timeout 240 -C Release + cmake . -B out/secure-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_DEFAULT }} + cmake --build out/secure-${{ matrix.c_or_cxx }} --parallel 4 --config Release + ctest --test-dir out/secure-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release + + # Extra Windows: x86, clang-cl, and clang + - name: Debug, Win32 + if: matrix.tests == 'basic' && runner.os == 'Windows' + run: | + cmake . -B out/debug-x86-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Debug -A Win32 ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} + cmake --build out/debug-x86-${{ matrix.c_or_cxx }} --parallel 4 --config Debug + ctest --test-dir out/debug-x86-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Debug - # Basic, C++ - - name: Debug, C++ - if: matrix.tests == 'basic' && runner.os != 'Windows' # windows already uses C++ by default + - name: Release, Win32 + if: matrix.tests == 'basic' && runner.os == 'Windows' run: | - cmake . -B out/debug-cxx -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_USE_CXX=ON - cmake --build out/debug-cxx --parallel 8 --config Debug - ctest --test-dir out/debug-cxx --verbose --timeout 240 -C Debug + cmake . -B out/release-x86-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -A Win32 ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} + cmake --build out/release-x86-${{ matrix.c_or_cxx }} --parallel 4 --config Release + ctest --test-dir out/release-x86-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release - - name: Release, C++ - if: matrix.tests == 'basic' && runner.os != 'Windows' # windows already uses C++ by default + - name: Debug, Win32, clang-cl + if: matrix.tests == 'clang' && runner.os == 'Windows' run: | - cmake . -B out/release-cxx -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_USE_CXX=ON - cmake --build out/release-cxx --parallel 8 --config Release - ctest --test-dir out/release-cxx --verbose --timeout 240 -C Release + cmake . -B out/debug-x86-clang-cl-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Debug -A Win32 -T ClangCl ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} + cmake --build out/debug-x86-clang-cl-${{ matrix.c_or_cxx }} --parallel 4 --config Debug + ctest --test-dir out/debug-x86-clang-cl-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Debug - # Extra, Windows x86 - - name: Debug, Win32 - if: matrix.tests == 'extra' && runner.os == 'Windows' && !endsWith(matrix.os,'arm') + - name: Release, Win32, clang-cl + if: matrix.tests == 'clang' && runner.os == 'Windows' run: | - cmake . -B out/debug-x86 -DCMAKE_BUILD_TYPE=Debug -A Win32 - cmake --build out/debug-x86 --parallel 4 --config Debug - ctest --test-dir out/debug-x86 --verbose --timeout 240 -C Debug + cmake . -B out/release-x86-clang-cl-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -A Win32 -T ClangCl ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} + cmake --build out/release-x86-clang-cl-${{ matrix.c_or_cxx }} --parallel 4 --config Release + ctest --test-dir out/release-x86-clang-cl-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release - - name: Release, Win32 - if: matrix.tests == 'extra' && runner.os == 'Windows' && !endsWith(matrix.os,'arm') + - name: Debug, Windows, clang-cl + if: matrix.tests == 'clang' && runner.os == 'Windows' run: | - cmake . -B out/release-x86 -DCMAKE_BUILD_TYPE=Release -A Win32 - cmake --build out/release-x86 --parallel 4 --config Release - ctest --test-dir out/release-x86 --verbose --timeout 240 -C Release + cmake . -B out/debug-clang-cl-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Debug -T ClangCl ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} + cmake --build out/debug-clang-cl-${{ matrix.c_or_cxx }} --parallel 4 --config Debug + ctest --test-dir out/debug-clang-cl-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Debug - - name: Debug, clang-cl - if: matrix.tests == 'extra' && runner.os == 'Windows' && !endsWith(matrix.os,'arm') + - name: Release, Windows, clang-cl + if: matrix.tests == 'clang' && runner.os == 'Windows' run: | - cmake . -B out/debug-clang -DCMAKE_BUILD_TYPE=Debug -A Win32 -T ClangCl - cmake --build out/debug-clang --parallel 4 --config Debug - ctest --test-dir out/debug-clang --verbose --timeout 240 -C Debug + cmake . -B out/release-clang-cl-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -T ClangCl ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} + cmake --build out/release-clang-cl-${{ matrix.c_or_cxx }} --parallel 4 --config Release + ctest --test-dir out/release-clang-cl-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release - - name: Release, clang-cl - if: matrix.tests == 'extra' && runner.os == 'Windows' && !endsWith(matrix.os,'arm') + - name: Debug, Windows, clang + if: matrix.tests == 'clang' && runner.os == 'Windows' run: | - cmake . -B out/release-clang -DCMAKE_BUILD_TYPE=Release -A Win32 -T ClangCl - cmake --build out/release-clang --parallel 4 --config Release - ctest --test-dir out/release-clang --verbose --timeout 240 -C Release + cmake . -B out/debug-clang-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} + cmake --build out/debug-clang-${{ matrix.c_or_cxx }} --parallel 4 --config Debug + ctest --test-dir out/debug-clang-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Debug + + - name: Release, Windows, clang + if: matrix.tests == 'clang' && runner.os == 'Windows' + run: | + cmake . -B out/release-clang-${{ matrix.c_or_cxx }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang ${{ steps.cmake_args.outputs.CMAKE_CXX_OPT_MSVC }} + cmake --build out/release-clang-${{ matrix.c_or_cxx }} --parallel 4 --config Release + ctest --test-dir out/release-clang-${{ matrix.c_or_cxx }} --verbose --timeout 240 -C Release # Extra, macOS fixed TLS - - name: Debug, TLS fixed + - name: Debug, macOS, TLS fixed if: matrix.tests == 'extra' && runner.os == 'macOS' run: | cmake . -B out/debug-tls-fixed -DCMAKE_BUILD_TYPE=Debug -DMI_TLS_MODEL_FIXED=ON cmake --build out/debug-tls-fixed --parallel 4 --config Debug ctest --test-dir out/debug-tls-fixed --verbose --timeout 240 -C Debug - - name: Release, TLS fixed + - name: Release, macOS, TLS fixed if: matrix.tests == 'extra' && runner.os == 'macOS' run: | cmake . -B out/release-tls-fixed -DCMAKE_BUILD_TYPE=Release -DMI_TLS_MODEL_FIXED=ON @@ -136,89 +171,74 @@ jobs: ctest --test-dir out/release-tls-fixed --verbose --timeout 240 -C Release # Extra, Linux pthread TLS - - name: Debug, TLS pthreads + - name: Debug, Linux, TLS pthreads if: matrix.tests == 'extra' && runner.os == 'linux' run: | cmake . -B out/debug-tls-pthreads -DCMAKE_BUILD_TYPE=Debug -DMI_TLS_MODEL_PTHREADS=ON cmake --build out/debug-tls-pthreads --parallel 4 --config Debug ctest --test-dir out/debug-tls-pthreads --verbose --timeout 240 -C Debug - - name: Release, TLS pthreads + - name: Release, Linux, TLS pthreads if: matrix.tests == 'extra' && runner.os == 'linux' run: | - cmake . -B out/release-tls-pthreads -DCMAKE_BUILD_TYPE=Release -DMI_TLS_MODEL_PTHREADS=ON -DMI_SEE_ASM=ON + cmake . -B out/release-tls-pthreads -DCMAKE_BUILD_TYPE=Release -DMI_TLS_MODEL_PTHREADS=ON -DMI_SEE_ASM=ON cmake --build out/release-tls-pthreads --parallel 4 --config Release ctest --test-dir out/release-tls-pthreads --verbose --timeout 240 -C Release - - name: Release, TLS pthreads, Asm - if: matrix.tests == 'extra' && runner.os == 'linux' - uses: actions/upload-artifact@v7 - with: - name: ${{ matrix.os }}-pthreads-asm - path: out/release-tls-pthreads/CMakeFiles/mimalloc-static.dir/src/*.c.s - - # Extra - name: Release, SIMD if: matrix.tests == 'extra' run: | - cmake . -B out/release-simd -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_OPT_SIMD=ON + cmake . -B out/release-simd -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_OPT_SIMD=ON cmake --build out/release-simd --parallel 8 --config Release ctest --test-dir out/release-simd --verbose --timeout 240 -C Release - - name: Release, C++, SIMD - if: matrix.tests == 'basic' && runner.os != 'Windows' && runner.os != 'macOS' - run: | - cmake . -B out/release-cxx -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_OPT_SIMD=ON -DMI_USE_CXX=ON - cmake --build out/release-cxx --parallel 8 --config Release - ctest --test-dir out/release-cxx --verbose --timeout 240 -C Release - - name: Debug, C++, clang++ - if: matrix.tests == 'extra' && runner.os == 'Linux' + if: matrix.tests == 'extra' && runner.os == 'Linux' run: | CC=clang CXX=clang++ cmake . -B out/debug-clang-cxx -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_USE_CXX=ON cmake --build out/debug-clang-cxx --parallel 8 --config Debug ctest --test-dir out/debug-clang-cxx --verbose --timeout 240 -C Debug - name: Release, C++, clang++ - if: matrix.tests == 'extra' && runner.os == 'Linux' + if: matrix.tests == 'extra' && runner.os == 'Linux' run: | CC=clang CXX=clang++ cmake . -B out/release-clang-cxx -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_USE_CXX=ON -DMI_SEE_ASM=ON cmake --build out/release-clang-cxx --parallel 8 --config Release ctest --test-dir out/release-clang-cxx --verbose --timeout 240 -C Release - name: Release, C++, clang++, Asm - if: matrix.tests == 'extra' && runner.os == 'Linux' - uses: actions/upload-artifact@v7 + if: matrix.tests == 'extra' && runner.os == 'Linux' + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ matrix.os }}-clang-cxx-asm - path: out/release-clang-cxx/*.s + path: out/release-clang-cxx/CMakeFiles/mimalloc-static.dir/src/*.s - name: Debug, ASAN if: matrix.tests == 'extra' && runner.os == 'Linux' run: | - CC=clang CXX=clang++ cmake . -B out/debug-asan -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_TRACK=ASAN + CC=clang CXX=clang++ cmake . -B out/debug-asan -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_TRACK=ASAN cmake --build out/debug-asan --parallel 8 --config Debug ctest --test-dir out/debug-asan --verbose --timeout 240 -C Debug - name: Debug, UBSAN - if: matrix.tests == 'extra' && runner.os == 'Linux' + if: matrix.tests == 'extra' && runner.os == 'Linux' run: | - CC=clang CXX=clang++ cmake . -B out/debug-ubsan -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_DEBUG_UBSAN=ON - cmake --build out/debug-ubsan --parallel 8 --config Debug - ctest --test-dir out/debug-ubsan --verbose --timeout 240 -C Debug + CC=clang CXX=clang++ cmake . -B out/debug-ubsan-cxx -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_DEBUG_UBSAN=ON + cmake --build out/debug-ubsan-cxx --parallel 8 --config Debug + ctest --test-dir out/debug-ubsan-cxx --verbose --timeout 240 -C Debug - name: Debug, TSAN - if: matrix.tests == 'extra' && runner.os == 'Linux' + if: matrix.tests == 'tsan' && runner.os == 'Linux' run: | - CC=clang CXX=clang++ cmake . -B out/debug-tsan -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_DEBUG_TSAN=ON + CC=clang CXX=clang++ cmake . -B out/debug-tsan -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_DEBUG_TSAN=ON cmake --build out/debug-tsan --parallel 8 --config Debug ctest --test-dir out/debug-tsan --verbose --timeout 240 -C Debug - name: Debug, Guarded if: matrix.tests == 'extra' && runner.os != 'macOS' run: | - cmake . -B out/debug-guarded -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_GUARDED=ON + cmake . -B out/debug-guarded -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_GUARDED=ON cmake --build out/debug-guarded --parallel 8 --config Debug ctest --test-dir out/debug-guarded --verbose --timeout 240 -C Debug env: @@ -233,18 +253,39 @@ jobs: env: MIMALLOC_GUARDED_SAMPLE_RATE: 10 + - name: Debug, Use pagemap + if: matrix.tests == 'extra' && runner.os == 'Linux' && startsWith(github.ref_name,'dev3') + run: | + cmake . -B out/debug-guarded -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_FREE_USE_PAGEMAP=ON + cmake --build out/debug-guarded --parallel 8 --config Debug + ctest --test-dir out/debug-guarded --verbose --timeout 240 -C Debug + + - name: Release, Use pagemap + if: matrix.tests == 'extra' && runner.os == 'Linux' && startsWith(github.ref_name,'dev3') + run: | + cmake . -B out/release-guarded -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_FREE_USE_PAGEMAP=ON + cmake --build out/release-guarded --parallel 8 --config Release + ctest --test-dir out/release-guarded --verbose --timeout 240 -C Release + - name: Debug, Secure Full if: matrix.tests == 'extra' && runner.os != 'macOS' run: | - cmake . -B out/debug-secure-full -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_SECURE=FULL + cmake . -B out/debug-secure-full -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL -DMI_SECURE=FULL cmake --build out/debug-secure-full --parallel 8 --config Debug - ctest --test-dir out/debug-secure-full --verbose --timeout 240 -C Debug + ctest --test-dir out/debug-secure-full --verbose --timeout 240 -C Debug + + - name: Release, Secure Full + if: matrix.tests == 'extra' && runner.os != 'macOS' + run: | + cmake . -B out/release-secure-full -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_SECURE=FULL + cmake --build out/release-secure-full --parallel 8 --config Release + ctest --test-dir out/release-secure-full --verbose --timeout 240 -C Release # MSYS2 mingw64 - name: mingw-ucrt64 x64, Setup if: matrix.tests == 'mingw-ucrt64' - uses: msys2/setup-msys2@v2 - with: + uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0 + with: msystem: UCRT64 install: | mingw-w64-ucrt-x86_64-gcc @@ -273,7 +314,7 @@ jobs: # VM: FreeBSD (arm64 and x64) - name: FreeBSD arm64, Setup if: matrix.tests == 'freebsd-arm64' - uses: vmactions/freebsd-vm@v1 + uses: vmactions/freebsd-vm@83b151f58c6047089f4c80eb5ba2039d158ce093 # v1.5.3 with: arch: arm64 custom-shell-name: freebsd-arm64 @@ -287,7 +328,7 @@ jobs: shell: freebsd-arm64 {0} run: | export MI_TEST_LIGHT=1 - cmake . -B out/debug-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL + cmake . -B out/debug-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL cmake --build out/debug-arm64 --parallel 4 --config Debug ctest --test-dir out/debug-arm64 --verbose --timeout 240 -C Debug @@ -296,7 +337,7 @@ jobs: shell: freebsd-arm64 {0} run: | export MI_TEST_LIGHT=1 - cmake . -B out/release-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON + cmake . -B out/release-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON cmake --build out/release-arm64 --parallel 4 --config Release ctest --test-dir out/release-arm64 --verbose --timeout 240 -C Release @@ -305,14 +346,14 @@ jobs: shell: freebsd-arm64 {0} run: | export MI_TEST_LIGHT=1 - cmake . -B out/secure-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON + cmake . -B out/secure-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON cmake --build out/secure-arm64 --parallel 4 --config Release ctest --test-dir out/secure-arm64 --verbose --timeout 240 -C Release - name: FreeBSD x64, Setup if: matrix.tests == 'freebsd-x64' - uses: vmactions/freebsd-vm@v1 + uses: vmactions/freebsd-vm@83b151f58c6047089f4c80eb5ba2039d158ce093 # v1.5.3 with: arch: x86_64 usesh: true @@ -325,7 +366,7 @@ jobs: if: matrix.tests == 'freebsd-x64' shell: freebsd-x64 {0} run: | - cmake . -B out/debug-x64 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL + cmake . -B out/debug-x64 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL cmake --build out/debug-x64 --parallel 4 --config Debug ctest --test-dir out/debug-x64 --verbose --timeout 240 -C Debug @@ -333,7 +374,7 @@ jobs: if: matrix.tests == 'freebsd-x64' shell: freebsd-x64 {0} run: | - cmake . -B out/release-x64 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON + cmake . -B out/release-x64 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON cmake --build out/release-x64 --parallel 4 --config Release ctest --test-dir out/release-x64 --verbose --timeout 240 -C Release @@ -341,61 +382,77 @@ jobs: if: matrix.tests == 'freebsd-x64' shell: freebsd-x64 {0} run: | - cmake . -B out/secure-x64 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON + cmake . -B out/secure-x64 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON cmake --build out/secure-x64 --parallel 4 --config Release ctest --test-dir out/secure-x64 --verbose --timeout 240 -C Release - # VM: Alpine Linux with MUSL libc (riscv64 and x64) + # VM: Alpine Linux with MUSL libc (riscv64, x64, and arm32) - name: Alpine riscv64, Setup if: matrix.tests == 'alpine-riscv64' - uses: jirutka/setup-alpine@v1 + uses: jirutka/setup-alpine@ae3b3ddba35054804fc4a3507b519fa7e8152050 # v1.4.1 with: arch: riscv64 shell-name: alpine-riscv64.sh + apk-tools-url: https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v3.0.7/x86_64/apk.static#!sha256!c07bf5356eacc9dd7a8c56bc537f46702f007170287403299d52a04264e74b3c packages: | build-base cmake ninja + clang - - name: Alpine riscv64, Debug + - name: Alpine riscv64, Release clang if: matrix.tests == 'alpine-riscv64' shell: alpine-riscv64.sh {0} - env: - MI_TEST_LIGHT: 1 run: | - uname -m - cmake . -B out/debug-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL - cmake --build out/debug-riscv64 --parallel 4 --config Debug - ctest --test-dir out/debug-riscv64 --verbose --timeout 240 -C Debug + CC=clang CXX=clang++ cmake . -B out/release-riscv64-clang -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=rv64gcb_zacas_zalasr -DMI_SEE_ASM=ON + cmake --build out/release-riscv64-clang --parallel 4 --config Release + ctest --test-dir out/release-riscv64-clang --verbose --timeout 240 -C Release + - name: Alpine risc64, Asm clang + if: matrix.tests == 'alpine-riscv64' + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: alpine-riscv64-clang-asm + path: out/release-riscv64-clang/CMakeFiles/mimalloc-static.dir/src/*.s + - name: Alpine riscv64, Release if: matrix.tests == 'alpine-riscv64' shell: alpine-riscv64.sh {0} run: | - cmake . -B out/release-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_SEE_ASM=ON + cmake . -B out/release-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_SEE_ASM=ON cmake --build out/release-riscv64 --parallel 4 --config Release ctest --test-dir out/release-riscv64 --verbose --timeout 240 -C Release - name: Alpine risc64, Asm if: matrix.tests == 'alpine-riscv64' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: alpine-riscv64-asm - path: out/release-riscv64/CMakeFiles/mimalloc.dir/src/*.c.s + path: out/release-riscv64/CMakeFiles/mimalloc-static.dir/src/*.s + + - name: Alpine riscv64, Debug + if: matrix.tests == 'alpine-riscv64' + shell: alpine-riscv64.sh {0} + env: + MI_TEST_LIGHT: 1 + run: | + uname -m + cmake . -B out/debug-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL + cmake --build out/debug-riscv64 --parallel 4 --config Debug + ctest --test-dir out/debug-riscv64 --verbose --timeout 240 -C Debug - name: Alpine riscv64, Secure if: matrix.tests == 'alpine-riscv64' shell: alpine-riscv64.sh {0} run: | - cmake . -B out/secure-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON + cmake . -B out/secure-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON cmake --build out/secure-riscv64 --parallel 4 --config Release ctest --test-dir out/secure-riscv64 --verbose --timeout 240 -C Release - - name: Alpine x64, Setup if: matrix.tests == 'alpine-x64' - uses: jirutka/setup-alpine@v1 + uses: jirutka/setup-alpine@ae3b3ddba35054804fc4a3507b519fa7e8152050 # v1.4.1 with: arch: x86_64 shell-name: alpine-x64.sh @@ -407,7 +464,7 @@ jobs: if: matrix.tests == 'alpine-x64' shell: alpine-x64.sh {0} run: | - cmake . -B out/debug-x64 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL + cmake . -B out/debug-x64 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL cmake --build out/debug-x64 --parallel 4 --config Debug ctest --test-dir out/debug-x64 --verbose --timeout 240 -C Debug @@ -415,7 +472,7 @@ jobs: if: matrix.tests == 'alpine-x64' shell: alpine-x64.sh {0} run: | - cmake . -B out/release-x64 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON + cmake . -B out/release-x64 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON cmake --build out/release-x64 --parallel 4 --config Release ctest --test-dir out/release-x64 --verbose --timeout 240 -C Release @@ -423,13 +480,13 @@ jobs: if: matrix.tests == 'alpine-x64' shell: alpine-x64.sh {0} run: | - cmake . -B out/secure-x64 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON + cmake . -B out/secure-x64 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON cmake --build out/secure-x64 --parallel 4 --config Release ctest --test-dir out/secure-x64 --verbose --timeout 240 -C Release - name: Alpine arm32, Setup if: matrix.tests == 'alpine-arm32' - uses: jirutka/setup-alpine@v1 + uses: jirutka/setup-alpine@ae3b3ddba35054804fc4a3507b519fa7e8152050 # v1.4.1 with: arch: armv7 # or armhf for arm-v6 with hard float shell-name: alpine-arm32.sh @@ -444,7 +501,7 @@ jobs: MI_TEST_LIGHT: 1 run: | uname -m - cmake . -B out/debug-arm32 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL + cmake . -B out/debug-arm32 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG=FULL cmake --build out/debug-arm32 --parallel 4 --config Debug ctest --test-dir out/debug-arm32 --verbose --timeout 240 -C Debug @@ -452,7 +509,7 @@ jobs: if: matrix.tests == 'alpine-arm32' shell: alpine-arm32.sh {0} run: | - cmake . -B out/release-arm32 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON + cmake . -B out/release-arm32 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON cmake --build out/release-arm32 --parallel 4 --config Release ctest --test-dir out/release-arm32 --verbose --timeout 240 -C Release @@ -460,7 +517,7 @@ jobs: if: matrix.tests == 'alpine-arm32' shell: alpine-arm32.sh {0} run: | - cmake . -B out/secure-arm32 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON + cmake . -B out/secure-arm32 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON cmake --build out/secure-arm32 --parallel 4 --config Release ctest --test-dir out/secure-arm32 --verbose --timeout 240 -C Release diff --git a/CMakeLists.txt b/CMakeLists.txt index cd915e3a3..c47a3d05a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,8 +11,13 @@ option(MI_OVERRIDE "Override the standard malloc interface (i.e. define option(MI_XMALLOC "Enable abort() call on memory allocation failure by default" OFF) option(MI_SHOW_ERRORS "Show error and warning messages by default (only enabled by default in DEBUG mode)" OFF) option(MI_GUARDED "Build with guard pages behind certain object allocations (enabled by default in a debug build)" OFF) -option(MI_USE_CXX "Use the C++ compiler to compile the library (instead of the C compiler)" OFF) -option(MI_OPT_ARCH "Only for optimized builds: turn on architecture specific optimizations (for x64: '-march=haswell;-mavx2' (2013), for arm64: '-march=armv8.3-a' (2016), for riscV: '-march=rv64gcb_zacas' (2023))" OFF) + +set(MI_USE_CXX "DEFAULT" CACHE STRING "Use the C++ compiler to compile the library (instead of the C compiler)") +set_property(CACHE MI_USE_CXX PROPERTY STRINGS "OFF" "ON" "DEFAULT") + +set(MI_OPT_ARCH "DEFAULT" CACHE STRING "Only for optimized builds: turn on architecture specific optimizations (for x64: '-march=haswell;-mavx2' (2013), for arm64: '-march=armv8.1-a' (2016), for riscV: '-march=rv64gcb_zacas' (2023))") +set_property(CACHE MI_OPT_ARCH PROPERTY STRINGS "OFF" "ON" "avx2" "armv8.1" "armv8.3" "rva22" "rva23" "rv64gcb_zacas" "rv64gcb_zacas_zalasr" "DEFAULT") + option(MI_OPT_SIMD "Use SIMD instructions (requires MI_OPT_ARCH to be enabled)" OFF) set(MI_FREE_IS_CHECKED "DEFAULT" CACHE STRING "Check for invalid pointers in 'mi_free': OFF, SHARED, ON, DEFAULT. 'SHARED' enables it only for the dynamic/shared library when MI_OVERRIDE is ON") @@ -24,6 +29,9 @@ set_property(CACHE MI_DEBUG PROPERTY STRINGS "OFF" "ON" "INTERNAL" "FULL" "DEFAU set(MI_TRACK "OFF" CACHE STRING "Enable tracking: OFF, ASAN (address sanitizer), VALGRIND, ETW (Windows event tracing). Adds a small overhead.") set_property(CACHE MI_TRACK PROPERTY STRINGS "OFF" "ASAN" "VALGRIND" "ETW") +set(MI_ALLOW_THP "DEFAULT" CACHE STRING "Enable transparent huge pages on Linux: OFF, ON, FULL, DEFAULT. 'FULL' enables THP and also avoids splitting up huge pages during purging.") +set_property(CACHE MI_ALLOW_THP PROPERTY STRINGS "OFF" "ON" "FULL" "DEFAULT") + option(MI_DEBUG_TSAN "Build with thread sanitizer (needs clang)" OFF) option(MI_DEBUG_UBSAN "Build with undefined-behavior sanitizer (needs clang++)" OFF) @@ -132,6 +140,17 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/.git/index") endif() endif() +# case insensitive comparison +function(STRIEQUAL str1 str2 is_equal) + string(TOUPPER "${str1}" str1_upper) + string(TOUPPER "${str2}" str2_upper) + if(str1_upper STREQUAL str2_upper) + set(${is_equal} TRUE PARENT_SCOPE) + else() + set(${is_equal} FALSE PARENT_SCOPE) + endif() +endfunction() + # ----------------------------------------------------------------------------- # Convenience: set default build type and compiler depending on the build directory # ----------------------------------------------------------------------------- @@ -159,7 +178,18 @@ endif() # Determine architecture -set(MI_OPT_ARCH_FLAGS "") +if(CMAKE_SIZEOF_VOID_P EQUAL 16) + set(MI_ARCH_BITS "128") +elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(MI_ARCH_BITS "64") +elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(MI_ARCH_BITS "32") +elseif(CMAKE_SIZEOF_VOID_P EQUAL 2) + set(MI_ARCH_BITS "16") +else() + set(MI_ARCH_BITS "") +endif() + set(MI_ARCH "unknown") if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86|i[3456]86)$" OR CMAKE_GENERATOR_PLATFORM MATCHES "^(x86|Win32)$") set(MI_ARCH "x86") @@ -170,15 +200,12 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|armv[89].?|ARM64)$" OR CM elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|armv[34567].?|ARM)$") set(MI_ARCH "arm32") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(riscv|riscv32|riscv64)$") - if(CMAKE_SIZEOF_VOID_P==4) - set(MI_ARCH "riscv32") - else() - set(MI_ARCH "riscv64") - endif() + set(MI_ARCH "riscv${MI_ARCH_BITS}") else() set(MI_ARCH ${CMAKE_SYSTEM_PROCESSOR}) endif() -message(STATUS "Architecture: ${MI_ARCH}") # (${CMAKE_SYSTEM_PROCESSOR}, ${CMAKE_GENERATOR_PLATFORM}, ${CMAKE_GENERATOR})") + +message(STATUS "Architecture: ${MI_ARCH} (${MI_ARCH_BITS} bit)") # (${CMAKE_SYSTEM_PROCESSOR}, ${CMAKE_GENERATOR_PLATFORM}, ${CMAKE_GENERATOR})") # negative overrides (mainly to support vcpkg features) if(MI_NO_USE_CXX) @@ -187,8 +214,14 @@ endif() if(MI_NO_OPT_ARCH) set(MI_OPT_ARCH "OFF") -elseif(MI_ARCH STREQUAL "arm64") - set(MI_OPT_ARCH "ON") # enable armv8.3-a by default (has LDAPR) on arm64 unless MI_NO_OPT_ARCH is set +endif() + +if(MI_OPT_ARCH STREQUAL "DEFAULT") + if(MI_ARCH STREQUAL "arm64") + set(MI_OPT_ARCH "ON") # enable by default for arm64 (defaults to armv8.1-a which has fast atomics) + else() + set(MI_OPT_ARCH "OFF") + endif() endif() if(DEFINED ENV{MI_TEST_LIGHT}) @@ -204,11 +237,15 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_FRONTEND_VARIANT ST set(MI_CLANG_CL "ON") endif() -# force C++ compilation with msvc or clang-cl to use modern C++ atomics -if(CMAKE_C_COMPILER_ID MATCHES "MSVC|Intel" OR MI_CLANG_CL) - set(MI_USE_CXX "ON") -elseif(MI_DEBUG_UBSAN AND CMAKE_BUILD_TYPE MATCHES "Debug") # ubsan needs C++ - set(MI_USE_CXX "ON") +if(MI_USE_CXX STREQUAL "DEFAULT") + if(CMAKE_C_COMPILER_ID MATCHES "MSVC|Intel" OR MI_CLANG_CL) + # force C++ compilation with msvc or clang-cl to use modern C++ atomics + set(MI_USE_CXX "ON") + elseif(MI_DEBUG_UBSAN AND CMAKE_BUILD_TYPE MATCHES "Debug") # ubsan needs C++ + set(MI_USE_CXX "ON") + else() + set(MI_USE_CXX "OFF") + endif() endif() # enable C++ ? @@ -217,6 +254,8 @@ if(MI_USE_CXX) message(STATUS "Use the C++ compiler to compile (MI_USE_CXX=ON)") if(CMAKE_CXX_COMPILER_ID MATCHES "Intel" AND NOT CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM") list(APPEND mi_cflags -Kc++) + elseif(MSVC AND MSVC_VERSION GREATER_EQUAL 1914) + list(APPEND mi_cflags /Zc:__cplusplus) endif() endif() @@ -344,7 +383,7 @@ if(MI_SEE_ASM) if(CMAKE_C_COMPILER_ID MATCHES "MSVC" OR MI_CLANG_CL) list(APPEND mi_cflags -FA) else() - list(APPEND mi_cflags -save-temps) + list(APPEND mi_cflags -save-temps=obj) if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 14) message(STATUS "No GNU Line marker") list(APPEND mi_cflags -Wno-gnu-line-marker) @@ -444,11 +483,9 @@ if(MI_FREE_USE_PAGEMAP) endif() # deprecated -if(MI_OPT_FREE_SMALL) +if(MI_OPT_FREE_SMALL) if(MI_GUARDED OR MI_SECURE) message(STATUS "Cannot enable MI_OPT_FREE_SMALL in secure or guarded mode (MI_OPT_FREE_SMALL=OFF)") - elseif(MI_OPT_FREE) - message(STATUS "Cannot enable MI_OPT_FREE_SMALL with MI_OPT_FREE (MI_OPT_FREE_SMALL=OFF)") else() message(STATUS "Use aligned `mi_free_small` (MI_OPT_FREE_SMALL=ON)") list(APPEND mi_defines MI_OPT_FREE_SMALL=1) @@ -497,7 +534,23 @@ endif() if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android") if(MI_NO_THP) - message(STATUS "Disable transparent huge pages support (MI_NO_THP=ON)") + set(MI_ALLOW_THP "OFF") + endif() + if(MI_ALLOW_THP STREQUAL "DEFAULT") + if(CMAKE_SYSTEM_NAME MATCHES "Android") + set(MI_ALLOW_THP "OFF") + else() + set(MI_ALLOW_THP "FULL") + endif() + endif() + if(MI_ALLOW_THP STREQUAL "FULL") + message(STATUS "Enable full transparent huge pages support, where purging avoids splitting huge pages (MI_ALLOW_THP=FULL)") + list(APPEND mi_defines MI_DEFAULT_ALLOW_THP=2) + elseif (MI_ALLOW_THP) + message(STATUS "Enable transparent huge pages support (MI_ALLOW_THP=${MI_ALLOW_THP}) (also consider using FULL for better performance)") + list(APPEND mi_defines MI_DEFAULT_ALLOW_THP=1) + else() + message(STATUS "Disable transparent huge pages support (MI_ALLOW_THP=${MI_ALLOW_THP})") list(APPEND mi_defines MI_DEFAULT_ALLOW_THP=0) endif() endif() @@ -617,6 +670,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU" AND NOT MI_CLANG_CL) if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang") list(APPEND mi_cflags -Wno-static-in-inline -mno-outline) endif() + if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND MI_ARCH STREQUAL "arm64") + list(APPEND mi_cflags -Xclang -fno-split-cold-code) + endif() endif() if(CMAKE_C_COMPILER_ID MATCHES "Intel") @@ -645,34 +701,62 @@ if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU|Intel") endif() # Compiler and architecture specific flags -if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU|Intel" AND NOT CMAKE_SYSTEM_NAME MATCHES "Haiku") - if(MI_OPT_ARCH) - if(APPLE AND CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang" AND CMAKE_OSX_ARCHITECTURES) # to support multi-arch binaries (#999) - if("arm64" IN_LIST CMAKE_OSX_ARCHITECTURES) - list(APPEND MI_OPT_ARCH_FLAGS "-Xarch_arm64;-march=armv8.3-a") - endif() - if("x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES) - list(APPEND MI_OPT_ARCH_FLAGS "-Xarch_x86_64;-march=haswell;-Xarch_x86_64;-mavx2") - endif() - elseif(MI_ARCH STREQUAL "x64") - set(MI_OPT_ARCH_FLAGS "-march=haswell;-mavx2") # fast bit scan (since 2013) - elseif(MI_ARCH STREQUAL "arm64") - set(MI_OPT_ARCH_FLAGS "-march=armv8.3-a") # fast atomics (since 2016) - elseif(MI_ARCH STREQUAL "riscv64") - set(MI_OPT_ARCH_FLAGS "-march=rv64gcb_zacas") # fast bit scan and atomics (since 2023) TODO: add zalasr (2025) when possible. - elseif(MI_ARCH STREQUAL "riscv32") - set(MI_OPT_ARCH_FLAGS "-march=rv32gcb_zacas") # fast bit scan and atomics (since 2023) +if(MI_OPT_ARCH MATCHES "^(1|ON|YES|TRUE|Y)$") + if(APPLE AND CMAKE_OSX_ARCHITECTURES AND CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang" ) + set(MI_OPT_ARCH "ON") + elseif(MI_ARCH STREQUAL "arm64") + if(APPLE) + set(MI_OPT_ARCH "armv8.3") # M1+ supports arm8.3-a (which includes LDAPR (load-aquire)) + else() + set(MI_OPT_ARCH "armv8.1") # enable armv8.1-a by default (which has fast atomics) endif() + elseif(MI_ARCH STREQUAL "arm32") + set(MI_OPT_ARCH "armv8.1") # enable armv8.1-a by default (which has fast atomics) + elseif(MI_ARCH STREQUAL "x64") + set(MI_OPT_ARCH "avx2") + elseif(MI_ARCH MATCHES "riscv") + set(MI_OPT_ARCH "rv${MI_ARCH_BITS}gcb_zacas") # fast bit scan and atomics (since 2023) + # set(MI_OPT_ARCH "rv${MI_ARCH_BITS}gcb_zacas_zalasr") # fast bit scan and atomics (since 2025) + else() + set(MI_OPT_ARCH OFF) endif() endif() -if (MSVC AND MSVC_VERSION GREATER_EQUAL 1914) # vs2017+ - list(APPEND mi_cflags /Zc:__cplusplus) - if(MI_OPT_ARCH AND NOT MI_CLANG_CL) - if(MI_ARCH STREQUAL "x64") +# Compiler and architecture specific flags +set(MI_OPT_ARCH_FLAGS "") +if(NOT MI_OPT_ARCH MATCHES "^(0|OFF|NO|FALSE|N)$") + # apple support for multi-arch binaries (#999) + if(APPLE AND CMAKE_OSX_ARCHITECTURES AND CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang") + if("arm64" IN_LIST CMAKE_OSX_ARCHITECTURES) + list(APPEND MI_OPT_ARCH_FLAGS "-Xarch_arm64;-march=armv8.3-a") + endif() + if("x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES) + list(APPEND MI_OPT_ARCH_FLAGS "-Xarch_x86_64;-march=haswell;-Xarch_x86_64;-mavx2") + endif() + + # clang/gcc + elseif(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU|Intel" AND NOT CMAKE_SYSTEM_NAME MATCHES "Haiku") + if(MI_OPT_ARCH STREQUAL "avx2") + set(MI_OPT_ARCH_FLAGS "-march=haswell;-mavx2") # fast bit scan (since 2013) + elseif(MI_OPT_ARCH MATCHES "^armv[89].*$") + set(MI_OPT_ARCH_FLAGS "-march=${MI_OPT_ARCH}-a") # fast atomics + elseif(MI_OPT_ARCH MATCHES "^rva[0-9][0-9]$") + set(MI_OPT_ARCH_FLAGS "-march=${MI_OPT_ARCH}u${MI_ARCH_BITS}") + elseif(MI_OPT_ARCH MATCHES "^rv.*$") + set(MI_OPT_ARCH_FLAGS "-march=${MI_OPT_ARCH}") + else() + set(MI_OPT_ARCH_FLAGS "-march=${MI_OPT_ARCH}") + message(STATUS "warning: unknown MI_OPT_ARCH=${MI_OPT_ARCH} passed as '-march=${MI_OPT_ARCH}'") + endif() + + # msvc + elseif (MSVC AND MSVC_VERSION GREATER_EQUAL 1914 AND NOT MI_CLANG_CL) # vs2017+ + if(MI_OPT_ARCH STREQUAL "avx2") set(MI_OPT_ARCH_FLAGS "/arch:AVX2") - elseif(MI_ARCH STREQUAL "arm64") - set(MI_OPT_ARCH_FLAGS "/arch:armv8.3") # fast atomics (LDAPR) + elseif(MI_OPT_ARCH MATCHES "^armv[89].*$") + set(MI_OPT_ARCH_FLAGS "/arch:${MI_OPT_ARCH}") # fast atomics + else() + message(STATUS "warning: unknown MI_OPT_ARCH=${MI_OPT_ARCH} passed as '/arch:${MI_OPT_ARCH}'") endif() endif() endif() @@ -683,7 +767,7 @@ endif() if(MI_OPT_ARCH_FLAGS) list(APPEND mi_cflags ${MI_OPT_ARCH_FLAGS}) - message(STATUS "Architecture specific optimization is enabled (with ${MI_OPT_ARCH_FLAGS}) (MI_OPT_ARCH=ON)") + message(STATUS "Architecture specific optimization is enabled (with ${MI_OPT_ARCH_FLAGS}) (MI_OPT_ARCH=${MI_OPT_ARCH})") if (MI_OPT_SIMD) list(APPEND mi_defines "MI_OPT_SIMD=1") message(STATUS "SIMD instructions are enabled (MI_OPT_SIMD=ON)") @@ -692,6 +776,7 @@ elseif(MI_OPT_SIMD) message(STATUS "SIMD instructions are not enabled (either MI_OPT_ARCH=OFF or this architecture has no SIMD support)") endif() + # extra needed libraries # we prefer -l test over `find_library` as sometimes core libraries diff --git a/cmake/mimalloc-config-version.cmake b/cmake/mimalloc-config-version.cmake index 857ef9ab5..306ff6a68 100644 --- a/cmake/mimalloc-config-version.cmake +++ b/cmake/mimalloc-config-version.cmake @@ -1,6 +1,6 @@ set(mi_version_major 3) set(mi_version_minor 5) -set(mi_version_patch 0) +set(mi_version_patch 1) set(mi_version ${mi_version_major}.${mi_version_minor}) set(PACKAGE_VERSION ${mi_version}) diff --git a/contrib/vcpkg/portfile.cmake b/contrib/vcpkg/portfile.cmake index b5d219595..46dc48554 100644 --- a/contrib/vcpkg/portfile.cmake +++ b/contrib/vcpkg/portfile.cmake @@ -3,7 +3,7 @@ vcpkg_from_github( REPO microsoft/mimalloc HEAD_REF master - # The "REF" can be a commit hash, branch name (dev3), or a version (v3.5.0). + # The "REF" can be a commit hash, branch name (dev3), or a version (v3.5.1). REF "v${VERSION}" # The sha512 is the hash of the tar.gz bundle. diff --git a/contrib/vcpkg/vcpkg.json b/contrib/vcpkg/vcpkg.json index 39b0fadaf..f66b0ef8e 100644 --- a/contrib/vcpkg/vcpkg.json +++ b/contrib/vcpkg/vcpkg.json @@ -1,6 +1,6 @@ { "name": "mimalloc", - "version": "3.5.0", + "version": "3.5.1", "port-version": 0, "description": "Compact general purpose allocator with excellent performance", "homepage": "https://github.com/microsoft/mimalloc", diff --git a/doc/mimalloc-doc.h b/doc/mimalloc-doc.h index 7dc6f654c..bc34e6ce7 100644 --- a/doc/mimalloc-doc.h +++ b/doc/mimalloc-doc.h @@ -124,9 +124,18 @@ Further information: /// Free previously allocated memory. /// The pointer `p` must have been allocated before (or be \a NULL). -/// @param p pointer to free, or \a NULL. +/// @param p pointer to the block that is freed, or \a NULL. +/// See also mi_cfree() for a checked free that validates the pointer +/// before free-ing. +/// @see mi_cfree() void mi_free(void* p); +/// Checked `free`: just as mi_free() but always checks if the pointer `p` belongs to our heap +/// @param p pointer to a block that is freed, or any other arbitrary pointer. +/// This is safe to use when a pointer might be invalid or allocated by +/// another allocator (in which case the pointer is ignored and not freed). +void mi_cfree(void* p); + /// Allocate \a size bytes. /// @param size number of bytes to allocate. /// @returns pointer to the allocated memory or \a NULL if out of memory. @@ -404,19 +413,20 @@ void* mi_realloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t of /// \} /// \defgroup constantsize Constant size allocation -/// Constant size allocation and freeing +/// Inlined definitions for onstant size allocation and freeing. +/// If the size is constant, it can pick statically between +/// mi_malloc() and mi_malloc_small(). /// For example: /// ``` /// long* p = (long*)mi_malloc_csize(sizeof(long)) /// ``` -/// On __v3__ these can improve performance as they will statically -/// use mi_malloc_small(), mi_free_small(), etc. when possible. +/// On __v3__ these can improve performance. /// This is especially useful for compilers and runtimes where the /// the size is often statically known. These functions can be used /// even when the size is not constant but then there is no performance benefit. /// \{ -/// @brief Allocate a constant size object. +/// @brief __v3__: Allocate a constant size object. /// @param size A (compile-time) constant size. /// @return A pointer to an allocated block of size \a size bytes. /// @see mi_free_csize() @@ -429,13 +439,22 @@ void* mi_theap_malloc_csize(mi_theap_t* theap, size_t size); void* mi_theap_zalloc_csize(mi_theap_t* theap, size_t size); -/// @brief Free a pointer with a known constant size. +/// @brief __v3__: Free a pointer with a known constant size. /// @param p The pointer to the allocated block (or \a NULL ) -/// @param size The (compile time constant) size with which the pointer was allocated. +/// @param size The size with which the pointer was allocated. /// @see mi_malloc_csize() /// @see mi_free_size() +/// @see mi_free_size_nonnull() void mi_free_csize(void* p, size_t size); +/// @brief __v3__: Free a non-null pointer with a known constant size. +/// @param p The pointer to the allocated block (cannot be \a NULL !) +/// @param size The size with which the pointer was allocated. +/// @see mi_malloc_csize() +/// @see mi_free_size() +/// @see mi_free_size_nonnull() +void mi_free_csize_nonnull(void* p, size_t size); + /// \} /// \defgroup zeroinit Zero initialized re-allocation @@ -1056,12 +1075,13 @@ void* mi_zalloc_small(size_t size); /// __v3__: Can be used to free an object that was allocated with mi_malloc_small() or /// any allocation with a size < MI_SMALL_SIZE_MAX() -/// @param p Pointer that was returned from #mi_malloc_small et al. +/// @param p Pointer that was returned from #mi_malloc_small et al. (or \a NULL ) /// @details /// This function is meant for use in run-time systems for best /// performance and does not check if the pointer was _indeed_ allocated /// as a small object -- use with care! /// +/// @see mi_free_small_nonnull() /// @see mi_malloc_small() /// @see mi_zalloc_small() /// @see mi_heap_malloc_small() @@ -1070,6 +1090,23 @@ void* mi_zalloc_small(size_t size); /// @see mi_theap_zalloc_small() void mi_free_small(void* p); +/// __v3__: Can be used to free an object that was allocated with mi_malloc_small() or +/// any allocation with a size < MI_SMALL_SIZE_MAX() +/// @param p Pointer that was returned from #mi_malloc_small et al. Cannot be \a NULL ! +/// @details +/// This function is meant for use in run-time systems for best +/// performance and does not check if the pointer was _indeed_ allocated +/// as a small object or not NULL -- use with care! +/// +/// @see mi_free_small() +/// @see mi_malloc_small() +/// @see mi_zalloc_small() +/// @see mi_heap_malloc_small() +/// @see mi_heap_zalloc_small() +/// @see mi_theap_malloc_small() +/// @see mi_theap_zalloc_small() +void mi_free_small_nonnull(void* p); + /// \} @@ -1406,9 +1443,6 @@ void* mi_theap_realloc(mi_theap_t* theap, void* p, size_t newsize); /// /// \{ -/// Checked `free`: just as `mi_free` but always checks if the pointer `p` belongs to our heap -/// and is safe to use when a pointer might be invalid or allocated by another allocator. -void mi_cfree(void* p); void* mi__expand(void* p, size_t newsize); size_t mi_malloc_size(const void* p); @@ -1437,15 +1471,25 @@ int mi_reallocarr(void* p, size_t count, size_t size); void* mi_aligned_recalloc(void* p, size_t newcount, size_t size, size_t alignment); void* mi_aligned_offset_recalloc(void* p, size_t newcount, size_t size, size_t alignment, size_t offset); -/// @brief Free an object that was allocated with a known size. +/// @brief Free a block that was allocated with a known size. /// @param p The pointer that was allocated with \a size bytes (or \a NULL ) /// @param size The size in bytes. -/// __v3__: this can improve performance for objects with a \size < MI_SMALL_SIZE_MAX() +/// __v3__: this can improve performance for objects with a \a size < MI_SMALL_SIZE_MAX() /// as it will use mi_free_small() internally. Always use this if possible. /// @see mi_free_tp() /// @see mi_free_csize() +/// @see mi_free_size_nonnull() void mi_free_size(void* p, size_t size); +/// @brief Free a non-NULL pointer that was allocated with a known size. +/// @param p The pointer that was allocated with \a size bytes (cannot be \a NULL !) +/// @param size The size in bytes. +/// __v3__: this can improve performance for objects with a \a size < MI_SMALL_SIZE_MAX() +/// as it will use mi_free_small_nonnull() internally. Always use this if possible. +/// @see mi_free_tp() +/// @see mi_free_csize() +void mi_free_size_nonnull(void* p, size_t size); + /// @brief Free an object that was allocated aligned. /// @param p The pointer to the object (or \a NULL ) /// @param size The size of the object as allocated. diff --git a/docs/annotated.html b/docs/annotated.html index 87d0fb2f6..cd3d28680 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/bench.html b/docs/bench.html index 33217d900..e365f4a82 100644 --- a/docs/bench.html +++ b/docs/bench.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/build.html b/docs/build.html index 78e1cc335..2de2ebca0 100644 --- a/docs/build.html +++ b/docs/build.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/classes.html b/docs/classes.html index acb1e25d5..6ea4e4725 100644 --- a/docs/classes.html +++ b/docs/classes.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/doxygen_crawl.html b/docs/doxygen_crawl.html index aeea689b4..3c2434f1e 100644 --- a/docs/doxygen_crawl.html +++ b/docs/doxygen_crawl.html @@ -98,6 +98,7 @@ + @@ -113,6 +114,7 @@ + @@ -174,6 +176,7 @@ + @@ -250,9 +253,9 @@ - + diff --git a/docs/environment.html b/docs/environment.html index 4aafebc69..be9356a2f 100644 --- a/docs/environment.html +++ b/docs/environment.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/functions.html b/docs/functions.html index ff9b06858..fcb66777d 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/functions_vars.html b/docs/functions_vars.html index caa47689a..72a3e8398 100644 --- a/docs/functions_vars.html +++ b/docs/functions_vars.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/group__aligned.html b/docs/group__aligned.html index 3de1f8731..43ab98c71 100644 --- a/docs/group__aligned.html +++ b/docs/group__aligned.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/group__analysis.html b/docs/group__analysis.html index 62d1187be..5cb834f2f 100644 --- a/docs/group__analysis.html +++ b/docs/group__analysis.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/group__arenas.html b/docs/group__arenas.html index b8fef1965..e9cf0a6c5 100644 --- a/docs/group__arenas.html +++ b/docs/group__arenas.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/group__constantsize.html b/docs/group__constantsize.html index dc7e32ef6..5be895f99 100644 --- a/docs/group__constantsize.html +++ b/docs/group__constantsize.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
@@ -110,13 +110,13 @@
-

Constant size allocation and freeing For example: +

Inlined definitions for onstant size allocation and freeing. More...

- + @@ -125,14 +125,17 @@ - + + + +

Functions

void * mi_malloc_csize (size_t size)
 Allocate a constant size object.
 v3: Allocate a constant size object.
 
void * mi_zalloc_csize (size_t size)
 
void * mi_theap_zalloc_csize (mi_theap_t *theap, size_t size)
 
void mi_free_csize (void *p, size_t size)
 Free a pointer with a known constant size.
 v3: Free a pointer with a known constant size.
 
void mi_free_csize_nonnull (void *p, size_t size)
 v3: Free a non-null pointer with a known constant size.
 

Detailed Description

-

Constant size allocation and freeing For example:

-
long* p = (long*)mi_malloc_csize(sizeof(long))
-
void * mi_malloc_csize(size_t size)
Allocate a constant size object.
-

On v3 these can improve performance as they will statically use mi_malloc_small(), mi_free_small(), etc. when possible. This is especially useful for compilers and runtimes where the the size is often statically known. These functions can be used even when the size is not constant but then there is no performance benefit.

+

Inlined definitions for onstant size allocation and freeing.

+

If the size is constant, it can pick statically between mi_malloc() and mi_malloc_small(). For example:

long* p = (long*)mi_malloc_csize(sizeof(long))
+
void * mi_malloc_csize(size_t size)
v3: Allocate a constant size object.
+

On v3 these can improve performance. This is especially useful for compilers and runtimes where the the size is often statically known. These functions can be used even when the size is not constant but then there is no performance benefit.

Function Documentation

◆ mi_free_csize()

@@ -153,17 +156,54 @@

-

Free a pointer with a known constant size.

+

v3: Free a pointer with a known constant size.

Parameters
- +
pThe pointer to the allocated block (or NULL )
sizeThe (compile time constant) size with which the pointer was allocated.
sizeThe size with which the pointer was allocated.
-
See also
mi_malloc_csize()
+
See also
mi_malloc_csize()
-mi_free_size()
+mi_free_size() +
+mi_free_size_nonnull()
+ +

+
+ +

◆ mi_free_csize_nonnull()

+ +
+
+ + + + + + + + + + + +
void mi_free_csize_nonnull (void * p,
size_t size )
+
+ +

v3: Free a non-null pointer with a known constant size.

+
Parameters
+ + + +
pThe pointer to the allocated block (cannot be NULL !)
sizeThe size with which the pointer was allocated.
+
+
+
See also
mi_malloc_csize()
+
+mi_free_size()
+
+mi_free_size_nonnull()
@@ -182,7 +222,7 @@

-

Allocate a constant size object.

+

v3: Allocate a constant size object.

Parameters
@@ -190,7 +230,7 @@

Returns
A pointer to an allocated block of size size bytes.
-
See also
mi_free_csize()
+
See also
mi_free_csize()
mi_malloc()
diff --git a/docs/group__constantsize.js b/docs/group__constantsize.js index bfaeb70ff..a3b6430e1 100644 --- a/docs/group__constantsize.js +++ b/docs/group__constantsize.js @@ -1,6 +1,7 @@ var group__constantsize = [ [ "mi_free_csize", "group__constantsize.html#ga7a421e302074e598527c3eb052a6a3c5", null ], + [ "mi_free_csize_nonnull", "group__constantsize.html#ga38a93d373a9dc8edc8bca83edb6af5c5", null ], [ "mi_malloc_csize", "group__constantsize.html#ga9cd44d925d34f7180922e12bbf594571", null ], [ "mi_theap_malloc_csize", "group__constantsize.html#ga105bd667da91a15d113fe79be04d625c", null ], [ "mi_theap_zalloc_csize", "group__constantsize.html#ga1addf755829380581dd9c3c9175e376f", null ], diff --git a/docs/group__cpp.html b/docs/group__cpp.html index 42c217152..ddc0ac046 100644 --- a/docs/group__cpp.html +++ b/docs/group__cpp.html @@ -34,7 +34,7 @@

+ + +
sizeA (compile-time) constant size.
-
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/group__extended.html b/docs/group__extended.html index e4eb5ef4b..7d3c8c67c 100644 --- a/docs/group__extended.html +++ b/docs/group__extended.html @@ -34,7 +34,7 @@
-
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
@@ -171,6 +171,9 @@
void mi_free_small (void *p)
 v3: Can be used to free an object that was allocated with mi_malloc_small() or any allocation with a size < MI_SMALL_SIZE_MAX()
 
void mi_free_small_nonnull (void *p)
 v3: Can be used to free an object that was allocated with mi_malloc_small() or any allocation with a size < MI_SMALL_SIZE_MAX()
 

Detailed Description

Internal functionality.

@@ -310,12 +313,53 @@

mi_malloc_small() or any allocation with a size < MI_SMALL_SIZE_MAX()

Parameters
- +
pPointer that was returned from mi_malloc_small et al.
pPointer that was returned from mi_malloc_small et al. (or NULL )

This function is meant for use in run-time systems for best performance and does not check if the pointer was indeed allocated as a small object – use with care!

-
See also
mi_malloc_small()
+
See also
mi_free_small_nonnull()
+
+mi_malloc_small()
+
+mi_zalloc_small()
+
+mi_heap_malloc_small()
+
+mi_heap_zalloc_small()
+
+mi_theap_malloc_small()
+
+mi_theap_zalloc_small()
+ +

+
+ +

◆ mi_free_small_nonnull()

+ +
+
+ + + + + + + +
void mi_free_small_nonnull (void * p)
+
+ +

v3: Can be used to free an object that was allocated with mi_malloc_small() or any allocation with a size < MI_SMALL_SIZE_MAX()

+
Parameters
+ + +
pPointer that was returned from mi_malloc_small et al. Cannot be NULL !
+
+
+

This function is meant for use in run-time systems for best performance and does not check if the pointer was indeed allocated as a small object or not NULL – use with care!

+
See also
mi_free_small()
+
+mi_malloc_small()
mi_zalloc_small()
diff --git a/docs/group__extended.js b/docs/group__extended.js index dd2242214..2934ab5be 100644 --- a/docs/group__extended.js +++ b/docs/group__extended.js @@ -6,6 +6,7 @@ var group__extended = [ "mi_output_fun", "group__extended.html#gadf31cea7d0332a81c8b882cbbdbadb8d", null ], [ "mi_collect", "group__extended.html#ga421430e2226d7d468529cec457396756", null ], [ "mi_free_small", "group__extended.html#ga2a8469764c38dcaf878f36e5f50e3610", null ], + [ "mi_free_small_nonnull", "group__extended.html#ga22890f54e5be433837069c8e97fdf379", null ], [ "mi_is_redirected", "group__extended.html#gaad25050b19f30cd79397b227e0157a3f", null ], [ "mi_malloc_small", "group__extended.html#ga7f050bc6b897da82692174f5fce59cde", null ], [ "mi_register_deferred_free", "group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece", null ], diff --git a/docs/group__heap.html b/docs/group__heap.html index 50a85dc5c..2d06f93fd 100644 --- a/docs/group__heap.html +++ b/docs/group__heap.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/group__malloc.html b/docs/group__malloc.html index 6b7796979..50f3615c3 100644 --- a/docs/group__malloc.html +++ b/docs/group__malloc.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
@@ -118,6 +118,9 @@ void mi_free (void *p)  Free previously allocated memory.
  +void mi_cfree (void *p) + Checked free: just as mi_free() but always checks if the pointer p belongs to our heap.
+  void * mi_malloc (size_t size)  Allocate size bytes.
  @@ -191,6 +194,31 @@

Returns
pointer to the allocated memory of size*count bytes, or NULL if either out of memory or when count*size overflows.

Returns a unique pointer if called with either size or count of 0.

See also
mi_zalloc()
+
+
+ +

◆ mi_cfree()

+ +
+
+ + + + + + + +
void mi_cfree (void * p)
+
+ +

Checked free: just as mi_free() but always checks if the pointer p belongs to our heap.

+
Parameters
+ + +
ppointer to a block that is freed, or any other arbitrary pointer. This is safe to use when a pointer might be invalid or allocated by another allocator (in which case the pointer is ignored and not freed).
+
+
+
@@ -242,10 +270,11 @@

Parameters
- +
ppointer to free, or NULL.
ppointer to the block that is freed, or NULL. See also mi_cfree() for a checked free that validates the pointer before free-ing.
+
See also
mi_cfree()

diff --git a/docs/group__malloc.js b/docs/group__malloc.js index 9fd99dfe4..28d281767 100644 --- a/docs/group__malloc.js +++ b/docs/group__malloc.js @@ -1,6 +1,7 @@ var group__malloc = [ [ "mi_calloc", "group__malloc.html#ga6686568014b54d1e6c7ac64a076e4f56", null ], + [ "mi_cfree", "group__malloc.html#ga705dc7a64bffacfeeb0141501a5c35d7", null ], [ "mi_expand", "group__malloc.html#ga19299856216cfbb08e2628593654dfb0", null ], [ "mi_free", "group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95", null ], [ "mi_good_size", "group__malloc.html#gac057927cd06c854b45fe7847e921bd47", null ], diff --git a/docs/group__options.html b/docs/group__options.html index 2824760be..5ad478ad4 100644 --- a/docs/group__options.html +++ b/docs/group__options.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/group__posix.html b/docs/group__posix.html index 96a40e751..e97ba3f22 100644 --- a/docs/group__posix.html +++ b/docs/group__posix.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
@@ -115,9 +115,6 @@ - - - @@ -157,8 +154,11 @@ - + + + + @@ -301,25 +301,6 @@

- - - -

◆ mi_cfree()

- -
-
-

Functions

void mi_cfree (void *p)
 Checked free: just as mi_free but always checks if the pointer p belongs to our heap and is safe to use when a pointer might be invalid or allocated by another allocator.
 
void * mi__expand (void *p, size_t newsize)
 
size_t mi_malloc_size (const void *p)
void * mi_aligned_offset_recalloc (void *p, size_t newcount, size_t size, size_t alignment, size_t offset)
 
void mi_free_size (void *p, size_t size)
 Free an object that was allocated with a known size.
 Free a block that was allocated with a known size.
 
void mi_free_size_nonnull (void *p, size_t size)
 Free a non-NULL pointer that was allocated with a known size.
 
void mi_free_size_aligned (void *p, size_t size, size_t alignment)
 Free an object that was allocated aligned.
 
- - - - - - -
void mi_cfree (void * p)
-
- -

Checked free: just as mi_free but always checks if the pointer p belongs to our heap and is safe to use when a pointer might be invalid or allocated by another allocator.

-
@@ -388,17 +369,19 @@

-

Free an object that was allocated with a known size.

+

Free a block that was allocated with a known size.

Parameters
- +
pThe pointer that was allocated with size bytes (or NULL )
sizeThe size in bytes. v3: this can improve performance for objects with a \size < MI_SMALL_SIZE_MAX() as it will use mi_free_small() internally. Always use this if possible.
sizeThe size in bytes. v3: this can improve performance for objects with a size < MI_SMALL_SIZE_MAX() as it will use mi_free_small() internally. Always use this if possible.
See also
mi_free_tp()
-mi_free_csize()
+mi_free_csize() +
+mi_free_size_nonnull()

@@ -431,11 +414,44 @@

pThe pointer to the object (or NULL ) sizeThe size of the object as allocated. - alignmentThe requested alignment at the allocation. Currently just defers to mi_free_size() + alignmentThe requested alignment at the allocation. Currently just defers to mi_free_size() +

+
+ +

◆ mi_free_size_nonnull()

+ +
+
+ + + + + + + + + + + +
void mi_free_size_nonnull (void * p,
size_t size )
+
+ +

Free a non-NULL pointer that was allocated with a known size.

+
Parameters
+ + + +
pThe pointer that was allocated with size bytes (cannot be NULL !)
sizeThe size in bytes. v3: this can improve performance for objects with a size < MI_SMALL_SIZE_MAX() as it will use mi_free_small_nonnull() internally. Always use this if possible.
+
+
+
See also
mi_free_tp()
+
+mi_free_csize()
+
diff --git a/docs/group__posix.js b/docs/group__posix.js index ea4ed269e..fa782adcb 100644 --- a/docs/group__posix.js +++ b/docs/group__posix.js @@ -5,11 +5,11 @@ var group__posix = [ "mi_aligned_alloc", "group__posix.html#ga430ed1513f0571ff83be00ec58a98ee0", null ], [ "mi_aligned_offset_recalloc", "group__posix.html#ga16570deddd559001b44953eedbad0084", null ], [ "mi_aligned_recalloc", "group__posix.html#gaf82cbb4b4f24acf723348628451798d3", null ], - [ "mi_cfree", "group__posix.html#ga705dc7a64bffacfeeb0141501a5c35d7", null ], [ "mi_dupenv_s", "group__posix.html#gab41369c1a1da7504013a7a0b1d4dd958", null ], [ "mi_free_aligned", "group__posix.html#ga0d28d5cf61e6bfbb18c63092939fe5c9", null ], [ "mi_free_size", "group__posix.html#gae01389eedab8d67341ff52e2aad80ebb", null ], [ "mi_free_size_aligned", "group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc", null ], + [ "mi_free_size_nonnull", "group__posix.html#ga796602dae2a89797026f72e0c0240f32", null ], [ "mi_malloc_good_size", "group__posix.html#ga9d23ac7885fed7413c11d8e0ffa31071", null ], [ "mi_malloc_size", "group__posix.html#ga4531c9e775bb3ae12db57c1ba8a5d7de", null ], [ "mi_malloc_usable_size", "group__posix.html#ga06d07cf357bbac5c73ba5d0c0c421e17", null ], diff --git a/docs/group__stats.html b/docs/group__stats.html index 529d18d89..2555bcac6 100644 --- a/docs/group__stats.html +++ b/docs/group__stats.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
@@ -260,7 +260,7 @@

if (mi_stats_get(&stats)) {

...
}
-
#define mi_stats_t_decl(name)
Helper to declare a properly initialized mi_stats_t() local variable as name where the size and versi...
Definition mimalloc-doc.h:1099
+
#define mi_stats_t_decl(name)
Helper to declare a properly initialized mi_stats_t() local variable as name where the size and versi...
Definition mimalloc-doc.h:1136
bool mi_stats_get(mi_stats_t *stats)
Get the statistics for the current subprocess aggregated over all its heaps.
diff --git a/docs/group__subproc.html b/docs/group__subproc.html index f3830c87f..88e1e8976 100644 --- a/docs/group__subproc.html +++ b/docs/group__subproc.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/group__theap.html b/docs/group__theap.html index e8abeb2c7..f84216e6a 100644 --- a/docs/group__theap.html +++ b/docs/group__theap.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/group__typed.html b/docs/group__typed.html index bbd77cafb..4b16d9c36 100644 --- a/docs/group__typed.html +++ b/docs/group__typed.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
@@ -155,7 +155,7 @@

Detailed Description

Typed allocation macros.

For example:

int* p = mi_malloc_tp(int)
-
#define mi_malloc_tp(tp)
Allocate a block of type tp.
Definition mimalloc-doc.h:364
+
#define mi_malloc_tp(tp)
Allocate a block of type tp.
Definition mimalloc-doc.h:373

On v3 these can improve performance as they use the mi_<malloc>_csize api's that in turn can use mi_malloc_small(), mi_free_small(), etc.

Macro Definition Documentation

@@ -204,11 +204,11 @@

Parameters
- +
tpThe type of the object that is freed.
pA pointer to an object of type tp (or NULL ) Can be more efficient as it internally uses mi_free_csize()
pA pointer to an object of type tp (or NULL ) Can be more efficient as it internally uses mi_free_csize()
-
See also
mi_free_csize()
+
See also
mi_free_csize()
mi_free_small()
@@ -406,7 +406,7 @@

Returns
A pointer to an object of type tp, or NULL if out of memory.

Example:

Using this is more safe, but can also be more efficient since the allocation size is a compile-time constant.

See also
mi_malloc_csize()
+

Using this is more safe, but can also be more efficient since the allocation size is a compile-time constant.

See also
mi_malloc_csize()
mi_malloc_small()
diff --git a/docs/group__zeroinit.html b/docs/group__zeroinit.html index ecfa05d49..fde3d387d 100644 --- a/docs/group__zeroinit.html +++ b/docs/group__zeroinit.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/index.html b/docs/index.html index 25354e879..ba454f3e5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/mimalloc-doc_8h_source.html b/docs/mimalloc-doc_8h_source.html index 37d74e056..b02dec412 100644 --- a/docs/mimalloc-doc_8h_source.html +++ b/docs/mimalloc-doc_8h_source.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
@@ -119,531 +119,538 @@
10
123
124
-
128void mi_free(void* p);
-
129
-
134void* mi_malloc(size_t size);
-
135
-
140void* mi_zalloc(size_t size);
-
141
-
151void* mi_calloc(size_t count, size_t size);
-
152
-
166void* mi_realloc(void* p, size_t newsize);
-
167
-
181void* mi_expand(void* p, size_t newsize);
-
182
-
192void* mi_mallocn(size_t count, size_t size);
-
193
-
203void* mi_reallocn(void* p, size_t count, size_t size);
-
204
-
221void* mi_reallocf(void* p, size_t newsize);
-
222
-
223
-
232char* mi_strdup(const char* s);
-
233
-
243char* mi_strndup(const char* s, size_t n);
-
244
-
257char* mi_realpath(const char* fname, char* resolved_name);
-
258
-
272size_t mi_usable_size(void* p);
-
273
-
283size_t mi_good_size(size_t size);
-
284
-
286
-
287
-
288// ------------------------------------------------------
-
289// Aligned allocation
-
290// ------------------------------------------------------
-
291
-
299
-
317void* mi_malloc_aligned(size_t size, size_t alignment);
-
318void* mi_zalloc_aligned(size_t size, size_t alignment);
-
319void* mi_calloc_aligned(size_t count, size_t size, size_t alignment);
-
320void* mi_realloc_aligned(void* p, size_t newsize, size_t alignment);
-
321
-
333void* mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset);
-
334void* mi_zalloc_aligned_at(size_t size, size_t alignment, size_t offset);
-
335void* mi_calloc_aligned_at(size_t count, size_t size, size_t alignment, size_t offset);
-
336void* mi_realloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset);
-
337
-
339
-
340
-
350
-
364#define mi_malloc_tp(tp) ((tp*)mi_malloc_csize(sizeof(tp)))
-
365
-
372#define mi_free_tp(tp,p) (mi_free_csize(p,sizeof(tp)))
-
373
-
375#define mi_zalloc_tp(tp) ((tp*)mi_zalloc_csize(sizeof(tp)))
-
376
-
378#define mi_calloc_tp(tp,count) ((tp*)mi_calloc(count,sizeof(tp)))
-
379
-
381#define mi_mallocn_tp(tp,count) ((tp*)mi_mallocn(count,sizeof(tp)))
+
131void mi_free(void* p);
+
132
+
137void mi_cfree(void* p);
+
138
+
143void* mi_malloc(size_t size);
+
144
+
149void* mi_zalloc(size_t size);
+
150
+
160void* mi_calloc(size_t count, size_t size);
+
161
+
175void* mi_realloc(void* p, size_t newsize);
+
176
+
190void* mi_expand(void* p, size_t newsize);
+
191
+
201void* mi_mallocn(size_t count, size_t size);
+
202
+
212void* mi_reallocn(void* p, size_t count, size_t size);
+
213
+
230void* mi_reallocf(void* p, size_t newsize);
+
231
+
232
+
241char* mi_strdup(const char* s);
+
242
+
252char* mi_strndup(const char* s, size_t n);
+
253
+
266char* mi_realpath(const char* fname, char* resolved_name);
+
267
+
281size_t mi_usable_size(void* p);
+
282
+
292size_t mi_good_size(size_t size);
+
293
+
295
+
296
+
297// ------------------------------------------------------
+
298// Aligned allocation
+
299// ------------------------------------------------------
+
300
+
308
+
326void* mi_malloc_aligned(size_t size, size_t alignment);
+
327void* mi_zalloc_aligned(size_t size, size_t alignment);
+
328void* mi_calloc_aligned(size_t count, size_t size, size_t alignment);
+
329void* mi_realloc_aligned(void* p, size_t newsize, size_t alignment);
+
330
+
342void* mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset);
+
343void* mi_zalloc_aligned_at(size_t size, size_t alignment, size_t offset);
+
344void* mi_calloc_aligned_at(size_t count, size_t size, size_t alignment, size_t offset);
+
345void* mi_realloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset);
+
346
+
348
+
349
+
359
+
373#define mi_malloc_tp(tp) ((tp*)mi_malloc_csize(sizeof(tp)))
+
374
+
381#define mi_free_tp(tp,p) (mi_free_csize(p,sizeof(tp)))
382
-
384#define mi_reallocn_tp(p,tp,count) ((tp*)mi_reallocn(p,count,sizeof(tp)))
+
384#define mi_zalloc_tp(tp) ((tp*)mi_zalloc_csize(sizeof(tp)))
385
-
387#define mi_heap_malloc_tp(tp,hp) ((tp*)mi_heap_malloc(hp,sizeof(tp)))
+
387#define mi_calloc_tp(tp,count) ((tp*)mi_calloc(count,sizeof(tp)))
388
-
390#define mi_heap_zalloc_tp(tp,hp) ((tp*)mi_heap_zalloc(hp,sizeof(tp)))
+
390#define mi_mallocn_tp(tp,count) ((tp*)mi_mallocn(count,sizeof(tp)))
391
-
393#define mi_heap_calloc_tp(tp,hp,count) ((tp*)mi_heap_calloc(hp,count,sizeof(tp)))
+
393#define mi_reallocn_tp(p,tp,count) ((tp*)mi_reallocn(p,count,sizeof(tp)))
394
-
396#define mi_heap_mallocn_tp(tp,hp,count) ((tp*)mi_heap_mallocn(hp,count,sizeof(tp)))
+
396#define mi_heap_malloc_tp(tp,hp) ((tp*)mi_heap_malloc(hp,sizeof(tp)))
397
-
399#define mi_heap_reallocn_tp(tp,hp,p,count) ((tp*)mi_heap_reallocn(p,count,sizeof(tp)))
+
399#define mi_heap_zalloc_tp(tp,hp) ((tp*)mi_heap_zalloc(hp,sizeof(tp)))
400
-
402#define mi_heap_recalloc_tp(tp,hp,p,count) ((tp*)mi_heap_recalloc(p,count,sizeof(tp)))
+
402#define mi_heap_calloc_tp(tp,hp,count) ((tp*)mi_heap_calloc(hp,count,sizeof(tp)))
403
-
405
-
418
-
424void* mi_malloc_csize(size_t size);
-
425
-
426void* mi_zalloc_csize(size_t size);
-
427
-
428void* mi_theap_malloc_csize(mi_theap_t* theap, size_t size);
-
429
-
430void* mi_theap_zalloc_csize(mi_theap_t* theap, size_t size);
-
431
-
437void mi_free_csize(void* p, size_t size);
-
438
-
440
-
450
-
461void* mi_recalloc(void* p, size_t count, size_t size);
-
462
-
463void* mi_rezalloc(void* p, size_t newsize);
-
464void* mi_recalloc(void* p, size_t newcount, size_t size) ;
-
465
-
466void* mi_rezalloc_aligned(void* p, size_t newsize, size_t alignment);
-
467void* mi_rezalloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset);
-
468void* mi_recalloc_aligned(void* p, size_t newcount, size_t size, size_t alignment);
-
469void* mi_recalloc_aligned_at(void* p, size_t newcount, size_t size, size_t alignment, size_t offset);
-
470
-
471void* mi_heap_rezalloc(mi_heap_t* heap, void* p, size_t newsize);
-
472void* mi_heap_recalloc(mi_heap_t* heap, void* p, size_t newcount, size_t size);
-
473
-
474void* mi_heap_rezalloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment);
-
475void* mi_heap_rezalloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset);
-
476void* mi_heap_recalloc_aligned(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment);
-
477void* mi_heap_recalloc_aligned_at(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment, size_t offset);
-
478
-
480
+
405#define mi_heap_mallocn_tp(tp,hp,count) ((tp*)mi_heap_mallocn(hp,count,sizeof(tp)))
+
406
+
408#define mi_heap_reallocn_tp(tp,hp,p,count) ((tp*)mi_heap_reallocn(p,count,sizeof(tp)))
+
409
+
411#define mi_heap_recalloc_tp(tp,hp,p,count) ((tp*)mi_heap_recalloc(p,count,sizeof(tp)))
+
412
+
414
+
428
+
434void* mi_malloc_csize(size_t size);
+
435
+
436void* mi_zalloc_csize(size_t size);
+
437
+
438void* mi_theap_malloc_csize(mi_theap_t* theap, size_t size);
+
439
+
440void* mi_theap_zalloc_csize(mi_theap_t* theap, size_t size);
+
441
+
448void mi_free_csize(void* p, size_t size);
+
449
+
456void mi_free_csize_nonnull(void* p, size_t size);
+
457
+
459
+
469
+
480void* mi_recalloc(void* p, size_t count, size_t size);
481
-
482
+
482void* mi_rezalloc(void* p, size_t newsize);
+
483void* mi_recalloc(void* p, size_t newcount, size_t size) ;
+
484
+
485void* mi_rezalloc_aligned(void* p, size_t newsize, size_t alignment);
+
486void* mi_rezalloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset);
+
487void* mi_recalloc_aligned(void* p, size_t newcount, size_t size, size_t alignment);
+
488void* mi_recalloc_aligned_at(void* p, size_t newcount, size_t size, size_t alignment, size_t offset);
+
489
+
490void* mi_heap_rezalloc(mi_heap_t* heap, void* p, size_t newsize);
+
491void* mi_heap_recalloc(mi_heap_t* heap, void* p, size_t newcount, size_t size);
+
492
+
493void* mi_heap_rezalloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment);
+
494void* mi_heap_rezalloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset);
+
495void* mi_heap_recalloc_aligned(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment);
+
496void* mi_heap_recalloc_aligned_at(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment, size_t offset);
+
497
+
499
500
-
506struct mi_heap_s;
-
507
-
513typedef struct mi_heap_s mi_heap_t;
-
514
- -
517
- -
525
- +
501
+
519
+
525struct mi_heap_s;
+
526
+
532typedef struct mi_heap_s mi_heap_t;
533
- -
539
- + +
536
+
544
- +
552
-
556void mi_heap_set_numa_affinity(mi_heap_t* heap, int numa_node);
-
557
- -
564
-
570mi_heap_t* mi_heap_of(const void* p);
+ +
558
+ +
563
+
571
-
576bool mi_heap_contains(const mi_heap_t* heap, const void* p);
-
577
-
581bool mi_any_heap_contains(const void* p);
-
582
+
575void mi_heap_set_numa_affinity(mi_heap_t* heap, int numa_node);
+
576
+
583
-
589bool mi_is_in_heap_region(const void* p);
+
589mi_heap_t* mi_heap_of(const void* p);
590
-
596bool mi_check_owned(const void* p);
-
597
-
604bool mi_heap_contains_block(mi_heap_t* heap, const void* p);
-
605
-
612bool mi_heap_check_owned(mi_heap_t* heap, const void* p);
-
613
-
615void mi_heap_collect(mi_heap_t* heap, bool force);
+
595bool mi_heap_contains(const mi_heap_t* heap, const void* p);
+
596
+
600bool mi_any_heap_contains(const void* p);
+
601
+
602
+
608bool mi_is_in_heap_region(const void* p);
+
609
+
615bool mi_check_owned(const void* p);
616
-
619void* mi_heap_malloc(mi_heap_t* heap, size_t size);
-
620
-
624void* mi_heap_malloc_small(mi_heap_t* heap, size_t size);
-
625
-
628void* mi_heap_zalloc(mi_heap_t* heap, size_t size);
-
629
-
633void* mi_heap_zalloc_small(mi_heap_t* heap, size_t size);
-
634
-
637void* mi_heap_calloc(mi_heap_t* heap, size_t count, size_t size);
-
638
-
641void* mi_heap_mallocn(mi_heap_t* heap, size_t count, size_t size);
-
642
-
645char* mi_heap_strdup(mi_heap_t* heap, const char* s);
-
646
-
649char* mi_heap_strndup(mi_heap_t* heap, const char* s, size_t n);
-
650
-
653char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name);
-
654
-
655void* mi_heap_realloc(mi_heap_t* heap, void* p, size_t newsize);
-
656void* mi_heap_reallocn(mi_heap_t* heap, void* p, size_t count, size_t size);
-
657void* mi_heap_reallocf(mi_heap_t* heap, void* p, size_t newsize);
-
658
-
659void* mi_heap_malloc_aligned(mi_heap_t* heap, size_t size, size_t alignment);
-
660void* mi_heap_malloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset);
-
661void* mi_heap_zalloc_aligned(mi_heap_t* heap, size_t size, size_t alignment);
-
662void* mi_heap_zalloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset);
-
663void* mi_heap_calloc_aligned(mi_heap_t* heap, size_t count, size_t size, size_t alignment);
-
664void* mi_heap_calloc_aligned_at(mi_heap_t* heap, size_t count, size_t size, size_t alignment, size_t offset);
-
665void* mi_heap_realloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment);
-
666void* mi_heap_realloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset);
-
667
+
623bool mi_heap_contains_block(mi_heap_t* heap, const void* p);
+
624
+
631bool mi_heap_check_owned(mi_heap_t* heap, const void* p);
+
632
+
634void mi_heap_collect(mi_heap_t* heap, bool force);
+
635
+
638void* mi_heap_malloc(mi_heap_t* heap, size_t size);
+
639
+
643void* mi_heap_malloc_small(mi_heap_t* heap, size_t size);
+
644
+
647void* mi_heap_zalloc(mi_heap_t* heap, size_t size);
+
648
+
652void* mi_heap_zalloc_small(mi_heap_t* heap, size_t size);
+
653
+
656void* mi_heap_calloc(mi_heap_t* heap, size_t count, size_t size);
+
657
+
660void* mi_heap_mallocn(mi_heap_t* heap, size_t count, size_t size);
+
661
+
664char* mi_heap_strdup(mi_heap_t* heap, const char* s);
+
665
+
668char* mi_heap_strndup(mi_heap_t* heap, const char* s, size_t n);
669
-
670
-
671
-
676
+
672char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name);
+
673
+
674void* mi_heap_realloc(mi_heap_t* heap, void* p, size_t newsize);
+
675void* mi_heap_reallocn(mi_heap_t* heap, void* p, size_t count, size_t size);
+
676void* mi_heap_reallocf(mi_heap_t* heap, void* p, size_t newsize);
677
-
-
680typedef struct mi_heap_area_s {
-
681 void* blocks;
-
682 size_t reserved;
-
683 size_t committed;
-
684 size_t used;
-
685 size_t block_size;
- - - -
+
678void* mi_heap_malloc_aligned(mi_heap_t* heap, size_t size, size_t alignment);
+
679void* mi_heap_malloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset);
+
680void* mi_heap_zalloc_aligned(mi_heap_t* heap, size_t size, size_t alignment);
+
681void* mi_heap_zalloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset);
+
682void* mi_heap_calloc_aligned(mi_heap_t* heap, size_t count, size_t size, size_t alignment);
+
683void* mi_heap_calloc_aligned_at(mi_heap_t* heap, size_t count, size_t size, size_t alignment, size_t offset);
+
684void* mi_heap_realloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment);
+
685void* mi_heap_realloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset);
+
686
+
688
689
-
697typedef bool (mi_block_visit_fun)(const mi_heap_t* heap, const mi_heap_area_t* area, void* block, size_t block_size, void* arg);
-
698
-
713bool mi_heap_visit_blocks(const mi_heap_t* heap, bool visit_blocks, mi_block_visit_fun* visitor, void* arg);
-
714
-
730bool mi_abandoned_visit_blocks(mi_subproc_id_t subproc_id, int heap_tag, bool visit_blocks, mi_block_visit_fun* visitor, void* arg);
-
731
+
690
+
695
+
696
+
+
699typedef struct mi_heap_area_s {
+
700 void* blocks;
+
701 size_t reserved;
+
702 size_t committed;
+
703 size_t used;
+
704 size_t block_size;
+ + + +
+
708
+
716typedef bool (mi_block_visit_fun)(const mi_heap_t* heap, const mi_heap_area_t* area, void* block, size_t block_size, void* arg);
+
717
+
732bool mi_heap_visit_blocks(const mi_heap_t* heap, bool visit_blocks, mi_block_visit_fun* visitor, void* arg);
733
-
734// ------------------------------------------------------
-
735// Arenas
-
736// ------------------------------------------------------
-
737
-
745
-
747typedef int mi_arena_id_t;
-
748
-
757int mi_reserve_os_memory(size_t size, bool commit, bool allow_large);
-
758
-
766int mi_reserve_os_memory_ex(size_t size, bool commit, bool allow_large, bool exclusive, mi_arena_id_t* arena_id);
+
749bool mi_abandoned_visit_blocks(mi_subproc_id_t subproc_id, int heap_tag, bool visit_blocks, mi_block_visit_fun* visitor, void* arg);
+
750
+
752
+
753// ------------------------------------------------------
+
754// Arenas
+
755// ------------------------------------------------------
+
756
+
764
+
766typedef int mi_arena_id_t;
767
-
780int mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes, size_t timeout_msecs);
-
781
-
794int mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t timeout_msecs);
-
795
-
803int mi_reserve_huge_os_pages_at_ex(size_t pages, int numa_node, size_t timeout_msecs, bool exclusive, mi_arena_id_t* arena_id);
-
804
- -
808
-
820bool mi_manage_os_memory(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node);
-
821
-
832bool mi_manage_os_memory_ex(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node, bool exclusive, mi_arena_id_t* arena_id);
-
833
-
834
- -
837
-
842void* mi_arena_area(mi_arena_id_t arena_id, size_t* size);
-
843
-
844
-
845
- -
850
-
862mi_heap_t* mi_heap_new_ex(int heap_tag, bool allow_destroy, mi_arena_id_t arena_id);
+
776int mi_reserve_os_memory(size_t size, bool commit, bool allow_large);
+
777
+
785int mi_reserve_os_memory_ex(size_t size, bool commit, bool allow_large, bool exclusive, mi_arena_id_t* arena_id);
+
786
+
799int mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes, size_t timeout_msecs);
+
800
+
813int mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t timeout_msecs);
+
814
+
822int mi_reserve_huge_os_pages_at_ex(size_t pages, int numa_node, size_t timeout_msecs, bool exclusive, mi_arena_id_t* arena_id);
+
823
+ +
827
+
839bool mi_manage_os_memory(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node);
+
840
+
851bool mi_manage_os_memory_ex(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node, bool exclusive, mi_arena_id_t* arena_id);
+
852
+
853
+ +
856
+
861void* mi_arena_area(mi_arena_id_t arena_id, size_t* size);
+
862
863
-
865
-
866
-
875
-
880typedef void* mi_subproc_id_t;
-
881
- +
864
+ +
869
+
881mi_heap_t* mi_heap_new_ex(int heap_tag, bool allow_destroy, mi_arena_id_t arena_id);
+
882
884
- -
887
- -
891
- -
896
- -
902
- -
907
-
911typedef bool (mi_heap_visit_fun)(mi_heap_t* heap, void* arg);
-
912
- -
919
+
885
+
894
+
899typedef void* mi_subproc_id_t;
+
900
+ +
903
+ +
906
+ +
910
+ +
915
+
921
-
922
-
923// ------------------------------------------------------
-
924// Extended functionality
-
925// ------------------------------------------------------
+
926
+
930typedef bool (mi_heap_visit_fun)(mi_heap_t* heap, void* arg);
931
-
935#define MI_SMALL_SIZE_MAX (128*sizeof(void*))
-
936
-
940int mi_version(void);
+ +
938
+
940
941
-
949void mi_collect(bool force);
+
942// ------------------------------------------------------
+
943// Extended functionality
+
944// ------------------------------------------------------
+
945
950
- -
957
- -
963
-
967void mi_thread_init(void);
-
968
-
973void mi_thread_done(void);
-
974
-
981typedef void (mi_deferred_free_fun)(bool force, unsigned long long heartbeat, void* arg);
+
954#define MI_SMALL_SIZE_MAX (128*sizeof(void*))
+
955
+
959int mi_version(void);
+
960
+
968void mi_collect(bool force);
+
969
+ +
976
+
982
-
998void mi_register_deferred_free(mi_deferred_free_fun* deferred_free, void* arg);
-
999
-
1005typedef void (mi_output_fun)(const char* msg, void* arg);
-
1006
-
1013void mi_register_output(mi_output_fun* out, void* arg);
-
1014
-
1020typedef void (mi_error_fun)(int err, void* arg);
-
1021
-
1037void mi_register_error(mi_error_fun* errfun, void* arg);
-
1038
-
1046void* mi_malloc_small(size_t size);
-
1047
-
1055void* mi_zalloc_small(size_t size);
-
1056
-
1071void mi_free_small(void* p);
-
1072
-
1074
+
986void mi_thread_init(void);
+
987
+
992void mi_thread_done(void);
+
993
+
1000typedef void (mi_deferred_free_fun)(bool force, unsigned long long heartbeat, void* arg);
+
1001
+
1017void mi_register_deferred_free(mi_deferred_free_fun* deferred_free, void* arg);
+
1018
+
1024typedef void (mi_output_fun)(const char* msg, void* arg);
+
1025
+
1032void mi_register_output(mi_output_fun* out, void* arg);
+
1033
+
1039typedef void (mi_error_fun)(int err, void* arg);
+
1040
+
1056void mi_register_error(mi_error_fun* errfun, void* arg);
+
1057
+
1065void* mi_malloc_small(size_t size);
+
1066
+
1074void* mi_zalloc_small(size_t size);
1075
-
1076
-
1077
-
1078
-
1079// ------------------------------------------------------
-
1080// Statistics
-
1081// ------------------------------------------------------
-
1082
-
1086
-
1088#define MI_STAT_VERSION 4
-
1089
-
1099#define mi_stats_t_decl(name)
-
1100
-
- -
1104 size_t size;
-
1106 size_t version;
-
1107};
-
-
1108
-
1110typedef struct mi_stats_s mi_stats_t;
+
1091void mi_free_small(void* p);
+
1092
+ +
1109
1111
1112
- -
1116
- -
1122
-
1136void mi_process_info(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);
+
1113
+
1114
+
1115
+
1116// ------------------------------------------------------
+
1117// Statistics
+
1118// ------------------------------------------------------
+
1119
+
1123
+
1125#define MI_STAT_VERSION 4
+
1126
+
1136#define mi_stats_t_decl(name)
1137
-
1138
-
1143void mi_stats_print(void* out);
-
1144
-
1150void mi_stats_print_out(mi_output_fun* out, void* arg);
-
1151
-
1157bool mi_stats_get(mi_stats_t* stats);
-
1158
-
1164char* mi_stats_get_json(size_t buf_size, char* buf);
-
1165
-
1167size_t mi_stats_get_bin_size(size_t bin);
-
1168
-
1175bool mi_heap_stats_get(mi_heap_t* heap, mi_stats_t* stats);
-
1176
-
1183char* mi_heap_stats_get_json(mi_heap_t* heap, size_t buf_size, char* buf); // use mi_free to free the result if the input buf == NULL
-
1184
- -
1190
- +
+ +
1141 size_t size;
+
1143 size_t version;
+
1144};
+
+
1145
+
1147typedef struct mi_stats_s mi_stats_t;
+
1148
+
1149
+ +
1153
+ +
1159
+
1173void mi_process_info(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);
+
1174
+
1175
+
1180void mi_stats_print(void* out);
+
1181
+
1187void mi_stats_print_out(mi_output_fun* out, void* arg);
+
1188
+
1194bool mi_stats_get(mi_stats_t* stats);
1195
-
1202bool mi_subproc_stats_get(mi_subproc_id_t subproc_id, mi_stats_t* stats);
-
1203
-
1210char* mi_subproc_stats_get_json(mi_subproc_id_t subproc_id, size_t buf_size, char* buf); // use mi_free to free the result if the input buf == NULL
-
1211
- -
1217
-
1218
- -
1224
-
1231char* mi_stats_as_json( mi_stats_t* stats, size_t buf_size, char* buf);
+
1201char* mi_stats_get_json(size_t buf_size, char* buf);
+
1202
+
1204size_t mi_stats_get_bin_size(size_t bin);
+
1205
+
1212bool mi_heap_stats_get(mi_heap_t* heap, mi_stats_t* stats);
+
1213
+
1220char* mi_heap_stats_get_json(mi_heap_t* heap, size_t buf_size, char* buf); // use mi_free to free the result if the input buf == NULL
+
1221
+ +
1227
+
1232
- -
1235
- -
1238
+
1239bool mi_subproc_stats_get(mi_subproc_id_t subproc_id, mi_stats_t* stats);
1240
-
1241// ------------------------------------------------------
-
1242// Runtime Options
-
1243// ------------------------------------------------------
-
1244
-
1249
- -
1253
- -
1260
+
1247char* mi_subproc_stats_get_json(mi_subproc_id_t subproc_id, size_t buf_size, char* buf); // use mi_free to free the result if the input buf == NULL
+
1248
+ +
1254
+
1255
+
1261
-
-
1263typedef enum mi_option_e {
-
1264 // stable options
- - - - - -
1270
-
1271 // advanced options
- - - - - - - - - - -
1282
-
1283 // guard pages
- - - - - -
1289
-
1290 // experimental options
- - - - - - - - - - - - - - - -
1306
-
1307 // v3 options
- - - - - - - - - - -
1318
- - +
1268char* mi_stats_as_json( mi_stats_t* stats, size_t buf_size, char* buf);
+
1269
+ +
1272
+ +
1275
+
1277
+
1278// ------------------------------------------------------
+
1279// Runtime Options
+
1280// ------------------------------------------------------
+
1281
+
1286
+ +
1290
+ +
1297
+
1298
+
+
1300typedef enum mi_option_e {
+
1301 // stable options
+ + + + + +
1307
+
1308 // advanced options
+ + + + + + + + + + +
1319
+
1320 // guard pages
+ + + + + +
1326
+
1327 // experimental options
+ + + + + + + + + + + + + + + +
1343
+
1344 // v3 options
+ + + + + + + + + + +
1355
+ +
-
1321
-
1322
- - - -
1326void mi_option_set_enabled(mi_option_t option, bool enable);
- -
1328
- -
1330long mi_option_get_clamp(mi_option_t option, long min, long max);
- -
1332
-
1333void mi_option_set(mi_option_t option, long value);
-
1334void mi_option_set_default(mi_option_t option, long value);
-
1335
-
1337
-
1350
-
1352struct mi_theap_s;
-
1353
-
1355typedef struct mi_theap_s mi_theap_t;
-
1356
- -
1364
-
1366void mi_theap_collect(mi_theap_t* theap, bool force);
-
1367
- -
1373
- -
1377
-
1380void* mi_theap_malloc(mi_theap_t* theap, size_t size);
-
1381
-
1385void* mi_theap_malloc_small(mi_theap_t* theap, size_t size);
-
1386
-
1389void* mi_theap_zalloc(mi_theap_t* theap, size_t size);
+
1358
+
1359
+ + + +
1363void mi_option_set_enabled(mi_option_t option, bool enable);
+ +
1365
+ +
1367long mi_option_get_clamp(mi_option_t option, long min, long max);
+ +
1369
+
1370void mi_option_set(mi_option_t option, long value);
+
1371void mi_option_set_default(mi_option_t option, long value);
+
1372
+
1374
+
1387
+
1389struct mi_theap_s;
1390
-
1394void* mi_theap_zalloc_small(mi_theap_t* theap, size_t size);
-
1395
-
1396void* mi_theap_calloc(mi_theap_t* theap, size_t count, size_t size);
-
1397void* mi_theap_malloc_aligned(mi_theap_t* theap, size_t size, size_t alignment);
-
1398void* mi_theap_realloc(mi_theap_t* theap, void* p, size_t newsize);
-
1399
+
1392typedef struct mi_theap_s mi_theap_t;
+
1393
+
1401
-
1402
-
1408
-
1411void mi_cfree(void* p);
-
1412void* mi__expand(void* p, size_t newsize);
-
1413
-
1414size_t mi_malloc_size(const void* p);
-
1415size_t mi_malloc_good_size(size_t size);
-
1416size_t mi_malloc_usable_size(const void *p);
-
1417
-
1418int mi_posix_memalign(void** p, size_t alignment, size_t size);
-
1419int mi__posix_memalign(void** p, size_t alignment, size_t size);
-
1420void* mi_memalign(size_t alignment, size_t size);
-
1421void* mi_valloc(size_t size);
-
1422void* mi_pvalloc(size_t size);
-
1423void* mi_aligned_alloc(size_t alignment, size_t size);
-
1424
-
1425unsigned short* mi_wcsdup(const unsigned short* s);
-
1426unsigned char* mi_mbsdup(const unsigned char* s);
-
1427int mi_dupenv_s(char** buf, size_t* size, const char* name);
-
1428int mi_wdupenv_s(unsigned short** buf, size_t* size, const unsigned short* name);
-
1429
-
1432void* mi_reallocarray(void* p, size_t count, size_t size);
-
1433
-
1435int mi_reallocarr(void* p, size_t count, size_t size);
+
1403void mi_theap_collect(mi_theap_t* theap, bool force);
+
1404
+ +
1410
+ +
1414
+
1417void* mi_theap_malloc(mi_theap_t* theap, size_t size);
+
1418
+
1422void* mi_theap_malloc_small(mi_theap_t* theap, size_t size);
+
1423
+
1426void* mi_theap_zalloc(mi_theap_t* theap, size_t size);
+
1427
+
1431void* mi_theap_zalloc_small(mi_theap_t* theap, size_t size);
+
1432
+
1433void* mi_theap_calloc(mi_theap_t* theap, size_t count, size_t size);
+
1434void* mi_theap_malloc_aligned(mi_theap_t* theap, size_t size, size_t alignment);
+
1435void* mi_theap_realloc(mi_theap_t* theap, void* p, size_t newsize);
1436
-
1437void* mi_aligned_recalloc(void* p, size_t newcount, size_t size, size_t alignment);
-
1438void* mi_aligned_offset_recalloc(void* p, size_t newcount, size_t size, size_t alignment, size_t offset);
+
1438
1439
-
1447void mi_free_size(void* p, size_t size);
-
1448
-
1454void mi_free_size_aligned(void* p, size_t size, size_t alignment);
-
1455
-
1456void mi_free_aligned(void* p, size_t alignment);
-
1457
-
1459
-
1472
-
1474void* mi_new(std::size_t n) noexcept(false);
-
1475
-
1477void* mi_new_n(size_t count, size_t size) noexcept(false);
-
1478
-
1480void* mi_new_aligned(std::size_t n, std::align_val_t alignment) noexcept(false);
-
1481
-
1483void* mi_new_nothrow(size_t n);
-
1484
-
1486void* mi_new_aligned_nothrow(size_t n, size_t alignment);
-
1487
-
1489void* mi_new_realloc(void* p, size_t newsize);
-
1490
-
1492void* mi_new_reallocn(void* p, size_t newcount, size_t size);
-
1493
-
1501template<class T> struct mi_stl_allocator { }
-
1502
-
1504
+
1445
+
1446void* mi__expand(void* p, size_t newsize);
+
1447
+
1448size_t mi_malloc_size(const void* p);
+
1449size_t mi_malloc_good_size(size_t size);
+
1450size_t mi_malloc_usable_size(const void *p);
+
1451
+
1452int mi_posix_memalign(void** p, size_t alignment, size_t size);
+
1453int mi__posix_memalign(void** p, size_t alignment, size_t size);
+
1454void* mi_memalign(size_t alignment, size_t size);
+
1455void* mi_valloc(size_t size);
+
1456void* mi_pvalloc(size_t size);
+
1457void* mi_aligned_alloc(size_t alignment, size_t size);
+
1458
+
1459unsigned short* mi_wcsdup(const unsigned short* s);
+
1460unsigned char* mi_mbsdup(const unsigned char* s);
+
1461int mi_dupenv_s(char** buf, size_t* size, const char* name);
+
1462int mi_wdupenv_s(unsigned short** buf, size_t* size, const unsigned short* name);
+
1463
+
1466void* mi_reallocarray(void* p, size_t count, size_t size);
+
1467
+
1469int mi_reallocarr(void* p, size_t count, size_t size);
+
1470
+
1471void* mi_aligned_recalloc(void* p, size_t newcount, size_t size, size_t alignment);
+
1472void* mi_aligned_offset_recalloc(void* p, size_t newcount, size_t size, size_t alignment, size_t offset);
+
1473
+
1482void mi_free_size(void* p, size_t size);
+
1483
+
1491void mi_free_size_nonnull(void* p, size_t size);
+
1492
+
1498void mi_free_size_aligned(void* p, size_t size, size_t alignment);
+
1499
+
1500void mi_free_aligned(void* p, size_t alignment);
+
1501
+
1503
+
1516
+
1518void* mi_new(std::size_t n) noexcept(false);
+
1519
+
1521void* mi_new_n(size_t count, size_t size) noexcept(false);
+
1522
+
1524void* mi_new_aligned(std::size_t n, std::align_val_t alignment) noexcept(false);
+
1525
+
1527void* mi_new_nothrow(size_t n);
+
1528
+
1530void* mi_new_aligned_nothrow(size_t n, size_t alignment);
+
1531
+
1533void* mi_new_realloc(void* p, size_t newsize);
+
1534
+
1536void* mi_new_reallocn(void* p, size_t newcount, size_t size);
+
1537
+
1545template<class T> struct mi_stl_allocator { }
+
1546
+
1548
void * mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset)
Allocate size bytes aligned by alignment at a specified offset.
void * mi_calloc_aligned(size_t count, size_t size, size_t alignment)
void * mi_realloc_aligned(void *p, size_t newsize, size_t alignment)
@@ -652,17 +659,17 @@
void * mi_calloc_aligned_at(size_t count, size_t size, size_t alignment, size_t offset)
void * mi_zalloc_aligned(size_t size, size_t alignment)
void * mi_realloc_aligned_at(void *p, size_t newsize, size_t alignment, size_t offset)
-
int heap_tag
heap tag associated with this area (see mi_heap_new_ex)
Definition mimalloc-doc.h:687
-
size_t block_size
size in bytes of one block
Definition mimalloc-doc.h:685
-
size_t committed
current committed bytes of this area
Definition mimalloc-doc.h:683
-
size_t full_block_size
size in bytes of a full block including padding and metadata.
Definition mimalloc-doc.h:686
-
size_t used
bytes in use by allocated blocks
Definition mimalloc-doc.h:684
-
void * blocks
start of the area containing heap blocks
Definition mimalloc-doc.h:681
-
size_t reserved
bytes reserved for this area
Definition mimalloc-doc.h:682
+
int heap_tag
heap tag associated with this area (see mi_heap_new_ex)
Definition mimalloc-doc.h:706
+
size_t block_size
size in bytes of one block
Definition mimalloc-doc.h:704
+
size_t committed
current committed bytes of this area
Definition mimalloc-doc.h:702
+
size_t full_block_size
size in bytes of a full block including padding and metadata.
Definition mimalloc-doc.h:705
+
size_t used
bytes in use by allocated blocks
Definition mimalloc-doc.h:703
+
void * blocks
start of the area containing heap blocks
Definition mimalloc-doc.h:700
+
size_t reserved
bytes reserved for this area
Definition mimalloc-doc.h:701
bool mi_abandoned_visit_blocks(mi_subproc_id_t subproc_id, int heap_tag, bool visit_blocks, mi_block_visit_fun *visitor, void *arg)
v1,v2: Visit all areas and blocks in abandoned heaps.
-
bool mi_block_visit_fun(const mi_heap_t *heap, const mi_heap_area_t *area, void *block, size_t block_size, void *arg)
Visitor function passed to mi_heap_visit_blocks()
Definition mimalloc-doc.h:697
+
bool mi_block_visit_fun(const mi_heap_t *heap, const mi_heap_area_t *area, void *block, size_t block_size, void *arg)
Visitor function passed to mi_heap_visit_blocks()
Definition mimalloc-doc.h:716
bool mi_heap_visit_blocks(const mi_heap_t *heap, bool visit_blocks, mi_block_visit_fun *visitor, void *arg)
Visit all areas and blocks in a heap.
-
An area of heap space contains blocks of a single size.
Definition mimalloc-doc.h:680
+
An area of heap space contains blocks of a single size.
Definition mimalloc-doc.h:699
int mi_reserve_os_memory(size_t size, bool commit, bool allow_large)
Reserve OS memory for use by mimalloc.
int mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes, size_t timeout_msecs)
Reserve pages of huge OS pages (1GiB) evenly divided over numa_nodes nodes, but stops after at most t...
int mi_reserve_os_memory_ex(size_t size, bool commit, bool allow_large, bool exclusive, mi_arena_id_t *arena_id)
Reserve OS memory to be managed in an arena.
@@ -672,14 +679,15 @@
int mi_reserve_huge_os_pages_at_ex(size_t pages, int numa_node, size_t timeout_msecs, bool exclusive, mi_arena_id_t *arena_id)
Reserve huge OS pages (1GiB) into a single arena.
int mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t timeout_msecs)
Reserve pages of huge OS pages (1GiB) at a specific numa_node, but stops after at most timeout_msecs ...
void mi_debug_show_arenas(void)
Show all current arena's.
-
int mi_arena_id_t
Each arena has an associated identifier.
Definition mimalloc-doc.h:747
+
int mi_arena_id_t
Each arena has an associated identifier.
Definition mimalloc-doc.h:766
void * mi_arena_area(mi_arena_id_t arena_id, size_t *size)
Return the start and size of an arena.
size_t mi_arena_min_alignment(void)
Return the minimal alignment required for managed OS memory.
mi_heap_t * mi_heap_new_in_arena(mi_arena_id_t arena_id)
Create a new heap that only allocates in the specified arena.
void * mi_theap_malloc_csize(mi_theap_t *theap, size_t size)
void * mi_theap_zalloc_csize(mi_theap_t *theap, size_t size)
-
void mi_free_csize(void *p, size_t size)
Free a pointer with a known constant size.
-
void * mi_malloc_csize(size_t size)
Allocate a constant size object.
+
void mi_free_csize_nonnull(void *p, size_t size)
v3: Free a non-null pointer with a known constant size.
+
void mi_free_csize(void *p, size_t size)
v3: Free a pointer with a known constant size.
+
void * mi_malloc_csize(size_t size)
v3: Allocate a constant size object.
void * mi_zalloc_csize(size_t size)
void * mi_new_nothrow(size_t n)
like mi_malloc, but when out of memory, use std::get_new_handler but return NULL on failure.
void * mi_new(std::size_t n) noexcept(false)
like mi_malloc(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception...
@@ -688,19 +696,20 @@
void * mi_new_aligned_nothrow(size_t n, size_t alignment)
like mi_malloc_aligned, but when out of memory, use std::get_new_handler but return NULL on failure.
void * mi_new_reallocn(void *p, size_t newcount, size_t size)
like mi_reallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc excepti...
void * mi_new_n(size_t count, size_t size) noexcept(false)
like mi_mallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exceptio...
-
std::allocator implementation for mimalloc for use in STL containers. For example:
Definition mimalloc-doc.h:1501
+
std::allocator implementation for mimalloc for use in STL containers. For example:
Definition mimalloc-doc.h:1545
void mi_thread_done(void)
Uninitialize mimalloc on a thread.
-
void mi_deferred_free_fun(bool force, unsigned long long heartbeat, void *arg)
Type of deferred free functions.
Definition mimalloc-doc.h:981
+
void mi_free_small_nonnull(void *p)
v3: Can be used to free an object that was allocated with mi_malloc_small() or any allocation with a ...
+
void mi_deferred_free_fun(bool force, unsigned long long heartbeat, void *arg)
Type of deferred free functions.
Definition mimalloc-doc.h:1000
void mi_free_small(void *p)
v3: Can be used to free an object that was allocated with mi_malloc_small() or any allocation with a ...
void mi_register_deferred_free(mi_deferred_free_fun *deferred_free, void *arg)
Register a deferred free function.
void mi_collect(bool force)
Eagerly free memory.
void * mi_zalloc_small(size_t size)
Allocate a zero initialized small object.
void * mi_malloc_small(size_t size)
Allocate a small object.
-
void mi_error_fun(int err, void *arg)
Type of error callback functions.
Definition mimalloc-doc.h:1020
+
void mi_error_fun(int err, void *arg)
Type of error callback functions.
Definition mimalloc-doc.h:1039
void mi_register_error(mi_error_fun *errfun, void *arg)
Register an error callback function.
bool mi_is_redirected()
Is the C runtime malloc API redirected?
void mi_thread_set_in_threadpool(void)
v3: Communicate that a thread is in a threadpool.
-
void mi_output_fun(const char *msg, void *arg)
Type of output functions.
Definition mimalloc-doc.h:1005
+
void mi_output_fun(const char *msg, void *arg)
Type of output functions.
Definition mimalloc-doc.h:1024
void mi_register_output(mi_output_fun *out, void *arg)
Register an output function.
int mi_version(void)
Return the mimalloc version.
void mi_thread_init(void)
Initialize mimalloc on a thread.
@@ -712,7 +721,7 @@
void mi_heap_delete(mi_heap_t *heap)
Delete a previously allocated heap.
void * mi_heap_malloc_aligned(mi_heap_t *heap, size_t size, size_t alignment)
mi_heap_t * mi_heap_set_default(mi_heap_t *heap)
v1,v2: Set the default heap to use in the current thread for mi_malloc() et al.
-
struct mi_heap_s mi_heap_t
Type of first-class heaps.
Definition mimalloc-doc.h:513
+
struct mi_heap_s mi_heap_t
Type of first-class heaps.
Definition mimalloc-doc.h:532
mi_heap_t * mi_heap_of(const void *p)
v3: return the heap that contains the given pointer.
void * mi_heap_zalloc_aligned_at(mi_heap_t *heap, size_t size, size_t alignment, size_t offset)
char * mi_heap_realpath(mi_heap_t *heap, const char *fname, char *resolved_name)
Resolve a file path name using a specific heap to allocate the result.
@@ -749,6 +758,7 @@
void * mi_reallocf(void *p, size_t newsize)
Re-allocate memory to newsize bytes,.
void * mi_mallocn(size_t count, size_t size)
Allocate count elements of size bytes.
void * mi_calloc(size_t count, size_t size)
Allocate zero-initialized count elements of size bytes.
+
void mi_cfree(void *p)
Checked free: just as mi_free() but always checks if the pointer p belongs to our heap.
void * mi_reallocn(void *p, size_t count, size_t size)
Re-allocate memory to count elements of size bytes.
char * mi_realpath(const char *fname, char *resolved_name)
Resolve a file path name.
size_t mi_good_size(size_t size)
Return the probable allocation block size for a given required size.
@@ -767,53 +777,53 @@
void mi_option_disable(mi_option_t option)
void mi_options_print(void)
Print out all runtime parameters for mimalloc. Also printed with MIMALLOC_VERBOSE=1 at startup.
void mi_option_set(mi_option_t option, long value)
-
mi_option_t
Runtime options.
Definition mimalloc-doc.h:1263
-
@ mi_option_guarded_min
only used when building with MI_GUARDED: minimal rounded object size for guarded objects (=0)
Definition mimalloc-doc.h:1284
-
@ mi_option_abandoned_reclaim_on_free
v1,v2: allow to reclaim an abandoned segment on a free (=1)
Definition mimalloc-doc.h:1301
-
@ mi_option_purge_extend_delay
v1,v2: extend purge delay on each subsequent delay (=1)
Definition mimalloc-doc.h:1302
-
@ mi_option_allow_thp
allow transparent huge pages? (=1) (on Android =0 by default). Set to 0 to disable THP for the proces...
Definition mimalloc-doc.h:1281
-
@ mi_option_show_stats
Print statistics on termination.
Definition mimalloc-doc.h:1266
-
@ mi_option_use_numa_nodes
0 = use all available numa nodes, otherwise use at most N nodes.
Definition mimalloc-doc.h:1296
-
@ mi_option_page_max_reclaim
v3: don't reclaim pages of the same originating theap if we already own N pages (in that size class) ...
Definition mimalloc-doc.h:1314
-
@ mi_option_abandoned_page_purge
v1,v2: immediately purge delayed purges on thread termination
Definition mimalloc-doc.h:1294
-
@ mi_option_eager_commit_delay
v2: the first N segments per thread are not eagerly committed (but per page in the segment on demand)
Definition mimalloc-doc.h:1292
-
@ mi_option_eager_commit
v1,v2: eager commit segments? (after eager_commit_delay segments) (enabled by default).
Definition mimalloc-doc.h:1291
-
@ mi_option_guarded_precise
disregard minimal alignment requirement to always place guarded blocks exactly in front of a guard pa...
Definition mimalloc-doc.h:1286
-
@ mi_option_visit_abandoned
allow visiting heap blocks from abandoned threads (=0)
Definition mimalloc-doc.h:1304
-
@ mi_option_os_tag
tag used for OS logging (macOS only for now) (=100)
Definition mimalloc-doc.h:1278
-
@ mi_option_arena_max_object_size
v3: set maximal object size that can be allocated in an arena (in KiB) (=2GiB on 64-bit).
Definition mimalloc-doc.h:1317
-
@ mi_option_minimal_purge_size
v3: set minimal purge size (in KiB) (=0). By default set to either 64 or 2048 if THP is enabled....
Definition mimalloc-doc.h:1316
-
@ _mi_option_last
Definition mimalloc-doc.h:1319
-
@ mi_option_destroy_on_exit
if set, release all memory on exit; sometimes used for dynamic unloading but can be unsafe
Definition mimalloc-doc.h:1299
-
@ mi_option_page_cross_thread_max_reclaim
v3: don't reclaim pages across threads if we already own N pages (in that size class) (=16)
Definition mimalloc-doc.h:1315
-
@ mi_option_page_commit_on_demand
v3: commit page memory on-demand (=0)
Definition mimalloc-doc.h:1313
-
@ mi_option_guarded_sample_seed
can be set to allow for a (more) deterministic re-execution when a guard page is triggered (=0)
Definition mimalloc-doc.h:1288
-
@ mi_option_verbose
Print verbose messages.
Definition mimalloc-doc.h:1267
-
@ mi_option_allow_large_os_pages
allow large (2 or 4 MiB) OS pages, implies eager commit.
Definition mimalloc-doc.h:1275
-
@ mi_option_arena_purge_mult
multiplier for purge_delay for the purging delay for arenas (=10)
Definition mimalloc-doc.h:1300
-
@ mi_option_target_segments_per_thread
v1,v2: experimental (=0)
Definition mimalloc-doc.h:1305
-
@ mi_option_generic_collect
collect heaps every N (=10000) generic allocation calls
Definition mimalloc-doc.h:1280
-
@ mi_option_retry_on_oom
retry on out-of-memory for N milli seconds (=400), set to 0 to disable retries. (only on windows)
Definition mimalloc-doc.h:1279
-
@ mi_option_guarded_max
only used when building with MI_GUARDED: maximal rounded object size for guarded objects (=0)
Definition mimalloc-doc.h:1285
-
@ mi_option_purge_decommits
should a memory purge decommit? (=1). Set to 0 to use memory reset on a purge (instead of decommit)
Definition mimalloc-doc.h:1276
-
@ mi_option_reserve_huge_os_pages_at
Reserve N huge OS pages at a specific NUMA node N.
Definition mimalloc-doc.h:1273
-
@ mi_option_pagemap_commit
v3: commit the full pagemap (to always catch invalid pointer uses) (=0)
Definition mimalloc-doc.h:1312
-
@ mi_option_max_segment_reclaim
v2: max. percentage of the abandoned segments can be reclaimed per try (=10%)
Definition mimalloc-doc.h:1298
-
@ mi_option_max_vabits
v3: max user space virtual address bits to consider (=48)
Definition mimalloc-doc.h:1311
-
@ mi_option_arena_reserve
initial memory size for arena reservation (= 1 GiB on 64-bit) (internally, this value is in KiB; use ...
Definition mimalloc-doc.h:1277
-
@ mi_option_page_reclaim_on_free
v3: reclaim abandoned pages on a free (=0). -1 disallowr always, 0 allows if the page originated from...
Definition mimalloc-doc.h:1308
-
@ mi_option_reserve_huge_os_pages
reserve N huge OS pages (1GiB pages) at startup
Definition mimalloc-doc.h:1272
-
@ mi_option_page_max_candidates
v3: max candidate pages to consider for allocation (=4)
Definition mimalloc-doc.h:1310
-
@ mi_option_disallow_os_alloc
1 = do not use OS memory for allocation (but only programmatically reserved arenas)
Definition mimalloc-doc.h:1297
-
@ mi_option_purge_delay
memory purging is delayed by N milli seconds; use 0 for immediate purging or -1 for no purging at all...
Definition mimalloc-doc.h:1295
-
@ mi_option_disallow_arena_alloc
1 = do not use arena's for allocation (except if using specific arena id's)
Definition mimalloc-doc.h:1303
-
@ mi_option_guarded_sample_rate
1 out of N allocations in the min/max range will be guarded (=1000)
Definition mimalloc-doc.h:1287
-
@ mi_option_max_errors
issue at most N error messages
Definition mimalloc-doc.h:1268
-
@ mi_option_page_full_retain
v3: retain N full (small) pages per size class (=2). Use -1 for infinite (as in v1,...
Definition mimalloc-doc.h:1309
-
@ mi_option_max_warnings
issue at most N warning messages
Definition mimalloc-doc.h:1269
-
@ mi_option_show_errors
Print error messages.
Definition mimalloc-doc.h:1265
-
@ mi_option_reserve_os_memory
reserve specified amount of OS memory in an arena at startup (internally, this value is in KiB; use m...
Definition mimalloc-doc.h:1274
-
@ mi_option_arena_eager_commit
eager commit arenas? Use 2 to enable just on overcommit systems (=2)
Definition mimalloc-doc.h:1293
+
mi_option_t
Runtime options.
Definition mimalloc-doc.h:1300
+
@ mi_option_guarded_min
only used when building with MI_GUARDED: minimal rounded object size for guarded objects (=0)
Definition mimalloc-doc.h:1321
+
@ mi_option_abandoned_reclaim_on_free
v1,v2: allow to reclaim an abandoned segment on a free (=1)
Definition mimalloc-doc.h:1338
+
@ mi_option_purge_extend_delay
v1,v2: extend purge delay on each subsequent delay (=1)
Definition mimalloc-doc.h:1339
+
@ mi_option_allow_thp
allow transparent huge pages? (=1) (on Android =0 by default). Set to 0 to disable THP for the proces...
Definition mimalloc-doc.h:1318
+
@ mi_option_show_stats
Print statistics on termination.
Definition mimalloc-doc.h:1303
+
@ mi_option_use_numa_nodes
0 = use all available numa nodes, otherwise use at most N nodes.
Definition mimalloc-doc.h:1333
+
@ mi_option_page_max_reclaim
v3: don't reclaim pages of the same originating theap if we already own N pages (in that size class) ...
Definition mimalloc-doc.h:1351
+
@ mi_option_abandoned_page_purge
v1,v2: immediately purge delayed purges on thread termination
Definition mimalloc-doc.h:1331
+
@ mi_option_eager_commit_delay
v2: the first N segments per thread are not eagerly committed (but per page in the segment on demand)
Definition mimalloc-doc.h:1329
+
@ mi_option_eager_commit
v1,v2: eager commit segments? (after eager_commit_delay segments) (enabled by default).
Definition mimalloc-doc.h:1328
+
@ mi_option_guarded_precise
disregard minimal alignment requirement to always place guarded blocks exactly in front of a guard pa...
Definition mimalloc-doc.h:1323
+
@ mi_option_visit_abandoned
allow visiting heap blocks from abandoned threads (=0)
Definition mimalloc-doc.h:1341
+
@ mi_option_os_tag
tag used for OS logging (macOS only for now) (=100)
Definition mimalloc-doc.h:1315
+
@ mi_option_arena_max_object_size
v3: set maximal object size that can be allocated in an arena (in KiB) (=2GiB on 64-bit).
Definition mimalloc-doc.h:1354
+
@ mi_option_minimal_purge_size
v3: set minimal purge size (in KiB) (=0). By default set to either 64 or 2048 if THP is enabled....
Definition mimalloc-doc.h:1353
+
@ _mi_option_last
Definition mimalloc-doc.h:1356
+
@ mi_option_destroy_on_exit
if set, release all memory on exit; sometimes used for dynamic unloading but can be unsafe
Definition mimalloc-doc.h:1336
+
@ mi_option_page_cross_thread_max_reclaim
v3: don't reclaim pages across threads if we already own N pages (in that size class) (=16)
Definition mimalloc-doc.h:1352
+
@ mi_option_page_commit_on_demand
v3: commit page memory on-demand (=0)
Definition mimalloc-doc.h:1350
+
@ mi_option_guarded_sample_seed
can be set to allow for a (more) deterministic re-execution when a guard page is triggered (=0)
Definition mimalloc-doc.h:1325
+
@ mi_option_verbose
Print verbose messages.
Definition mimalloc-doc.h:1304
+
@ mi_option_allow_large_os_pages
allow large (2 or 4 MiB) OS pages, implies eager commit.
Definition mimalloc-doc.h:1312
+
@ mi_option_arena_purge_mult
multiplier for purge_delay for the purging delay for arenas (=10)
Definition mimalloc-doc.h:1337
+
@ mi_option_target_segments_per_thread
v1,v2: experimental (=0)
Definition mimalloc-doc.h:1342
+
@ mi_option_generic_collect
collect heaps every N (=10000) generic allocation calls
Definition mimalloc-doc.h:1317
+
@ mi_option_retry_on_oom
retry on out-of-memory for N milli seconds (=400), set to 0 to disable retries. (only on windows)
Definition mimalloc-doc.h:1316
+
@ mi_option_guarded_max
only used when building with MI_GUARDED: maximal rounded object size for guarded objects (=0)
Definition mimalloc-doc.h:1322
+
@ mi_option_purge_decommits
should a memory purge decommit? (=1). Set to 0 to use memory reset on a purge (instead of decommit)
Definition mimalloc-doc.h:1313
+
@ mi_option_reserve_huge_os_pages_at
Reserve N huge OS pages at a specific NUMA node N.
Definition mimalloc-doc.h:1310
+
@ mi_option_pagemap_commit
v3: commit the full pagemap (to always catch invalid pointer uses) (=0)
Definition mimalloc-doc.h:1349
+
@ mi_option_max_segment_reclaim
v2: max. percentage of the abandoned segments can be reclaimed per try (=10%)
Definition mimalloc-doc.h:1335
+
@ mi_option_max_vabits
v3: max user space virtual address bits to consider (=48)
Definition mimalloc-doc.h:1348
+
@ mi_option_arena_reserve
initial memory size for arena reservation (= 1 GiB on 64-bit) (internally, this value is in KiB; use ...
Definition mimalloc-doc.h:1314
+
@ mi_option_page_reclaim_on_free
v3: reclaim abandoned pages on a free (=0). -1 disallowr always, 0 allows if the page originated from...
Definition mimalloc-doc.h:1345
+
@ mi_option_reserve_huge_os_pages
reserve N huge OS pages (1GiB pages) at startup
Definition mimalloc-doc.h:1309
+
@ mi_option_page_max_candidates
v3: max candidate pages to consider for allocation (=4)
Definition mimalloc-doc.h:1347
+
@ mi_option_disallow_os_alloc
1 = do not use OS memory for allocation (but only programmatically reserved arenas)
Definition mimalloc-doc.h:1334
+
@ mi_option_purge_delay
memory purging is delayed by N milli seconds; use 0 for immediate purging or -1 for no purging at all...
Definition mimalloc-doc.h:1332
+
@ mi_option_disallow_arena_alloc
1 = do not use arena's for allocation (except if using specific arena id's)
Definition mimalloc-doc.h:1340
+
@ mi_option_guarded_sample_rate
1 out of N allocations in the min/max range will be guarded (=1000)
Definition mimalloc-doc.h:1324
+
@ mi_option_max_errors
issue at most N error messages
Definition mimalloc-doc.h:1305
+
@ mi_option_page_full_retain
v3: retain N full (small) pages per size class (=2). Use -1 for infinite (as in v1,...
Definition mimalloc-doc.h:1346
+
@ mi_option_max_warnings
issue at most N warning messages
Definition mimalloc-doc.h:1306
+
@ mi_option_show_errors
Print error messages.
Definition mimalloc-doc.h:1302
+
@ mi_option_reserve_os_memory
reserve specified amount of OS memory in an arena at startup (internally, this value is in KiB; use m...
Definition mimalloc-doc.h:1311
+
@ mi_option_arena_eager_commit
eager commit arenas? Use 2 to enable just on overcommit systems (=2)
Definition mimalloc-doc.h:1330
size_t mi_malloc_usable_size(const void *p)
void mi_free_aligned(void *p, size_t alignment)
void * mi_aligned_offset_recalloc(void *p, size_t newcount, size_t size, size_t alignment, size_t offset)
@@ -823,9 +833,9 @@
void * mi_pvalloc(size_t size)
void * mi__expand(void *p, size_t newsize)
int mi_wdupenv_s(unsigned short **buf, size_t *size, const unsigned short *name)
-
void mi_cfree(void *p)
Checked free: just as mi_free but always checks if the pointer p belongs to our heap and is safe to u...
void * mi_memalign(size_t alignment, size_t size)
void mi_free_size_aligned(void *p, size_t size, size_t alignment)
Free an object that was allocated aligned.
+
void mi_free_size_nonnull(void *p, size_t size)
Free a non-NULL pointer that was allocated with a known size.
unsigned char * mi_mbsdup(const unsigned char *s)
int mi_reallocarr(void *p, size_t count, size_t size)
Corresponds to reallocarr in NetBSD.
size_t mi_malloc_good_size(size_t size)
@@ -834,10 +844,10 @@
int mi_posix_memalign(void **p, size_t alignment, size_t size)
int mi__posix_memalign(void **p, size_t alignment, size_t size)
void * mi_reallocarray(void *p, size_t count, size_t size)
Correspond s to reallocarray in FreeBSD.
-
void mi_free_size(void *p, size_t size)
Free an object that was allocated with a known size.
+
void mi_free_size(void *p, size_t size)
Free a block that was allocated with a known size.
void * mi_aligned_recalloc(void *p, size_t newcount, size_t size, size_t alignment)
-
size_t version
initialize with `MI_STAT_VERSION (so linking dynamically with a separately compiled mimalloc is safe)
Definition mimalloc-doc.h:1106
-
size_t size
initialize with sizeof(mi_stats_t) (so linking dynamically with a separately compiled mimalloc is saf...
Definition mimalloc-doc.h:1104
+
size_t version
initialize with `MI_STAT_VERSION (so linking dynamically with a separately compiled mimalloc is safe)
Definition mimalloc-doc.h:1143
+
size_t size
initialize with sizeof(mi_stats_t) (so linking dynamically with a separately compiled mimalloc is saf...
Definition mimalloc-doc.h:1141
void mi_process_info_print_out(mi_output_fun *out, void *arg)
Print out all process info.
void mi_subproc_heap_stats_print_out(mi_subproc_id_t subproc_id, mi_output_fun *out, void *arg)
v3: Print statistics for a given subprocess with each heap separately printed.
bool mi_heap_stats_get(mi_heap_t *heap, mi_stats_t *stats)
v3: Return statistics for a given heap.
@@ -857,11 +867,11 @@
size_t mi_stats_get_bin_size(size_t bin)
v3: Return the block size for the given bin.
void mi_process_info_print(void)
Print out all process info.
void mi_heap_stats_print_out(mi_heap_t *heap, mi_output_fun *out, void *arg)
v3: Show the heap statistics as JSON.
-
Statistics. See include/mimalloc-stats.h for the full definition.
Definition mimalloc-doc.h:1102
+
Statistics. See include/mimalloc-stats.h for the full definition.
Definition mimalloc-doc.h:1139
mi_subproc_id_t mi_subproc_main(void)
Get the main sub-process identifier.
-
bool mi_heap_visit_fun(mi_heap_t *heap, void *arg)
The type of a heap visitor function.
Definition mimalloc-doc.h:911
+
bool mi_heap_visit_fun(mi_heap_t *heap, void *arg)
The type of a heap visitor function.
Definition mimalloc-doc.h:930
mi_subproc_id_t mi_subproc_new(void)
Create a fresh sub-process (with no associated threads yet).
-
void * mi_subproc_id_t
A process can associate threads with sub-processes.
Definition mimalloc-doc.h:880
+
void * mi_subproc_id_t
A process can associate threads with sub-processes.
Definition mimalloc-doc.h:899
void mi_subproc_delete(mi_subproc_id_t subproc)
v1,v2: Delete a previously created sub-process.
mi_subproc_id_t mi_subproc_current(void)
Get the current sub-process identifier of this thread.
void mi_subproc_destroy(mi_subproc_id_t subproc)
v3: Destroy a previously created sub-process.
@@ -873,7 +883,7 @@
mi_theap_t * mi_theap_get_default()
Get the default theap that is used for mi_malloc() et al. for the current thread.
mi_theap_t * mi_heap_theap(mi_heap_t *heap)
Return the thread-local theap for the given heap.
void * mi_theap_malloc_aligned(mi_theap_t *theap, size_t size, size_t alignment)
-
struct mi_theap_s mi_theap_t
Type of thread-local heaps.
Definition mimalloc-doc.h:1355
+
struct mi_theap_s mi_theap_t
Type of thread-local heaps.
Definition mimalloc-doc.h:1392
void mi_theap_collect(mi_theap_t *theap, bool force)
Release outstanding resources in a specific theap.
void * mi_theap_zalloc(mi_theap_t *theap, size_t size)
Allocate zero-initialized in a specific heap.
void * mi_theap_zalloc_small(mi_theap_t *theap, size_t size)
Allocate a small object in a specific theap. size must be smaller or equal to MI_SMALL_SIZE_MAX().
diff --git a/docs/modes.html b/docs/modes.html index a2c488c29..7e29f1c65 100644 --- a/docs/modes.html +++ b/docs/modes.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/navtreedata.js b/docs/navtreedata.js index 91658f29a..dc276b57b 100644 --- a/docs/navtreedata.js +++ b/docs/navtreedata.js @@ -47,7 +47,7 @@ var NAVTREE = var NAVTREEINDEX = [ "annotated.html", -"group__theap.html#ga7905a73865733da8a43339a500533180" +"group__theap.html#ga11943128dc354313c4189e72f4299dbb" ]; var SYNCONMSG = 'click to disable panel synchronisation'; diff --git a/docs/navtreeindex0.js b/docs/navtreeindex0.js index 24e0f8478..fd485b71e 100644 --- a/docs/navtreeindex0.js +++ b/docs/navtreeindex0.js @@ -43,11 +43,12 @@ var NAVTREEINDEX0 = "group__arenas.html#gaa1a59464dbf3bc972d34fca0f86668fc":[7,7,2], "group__arenas.html#gaaf2d9976576d5efd5544be12848af949":[7,7,5], "group__constantsize.html":[7,3], -"group__constantsize.html#ga105bd667da91a15d113fe79be04d625c":[7,3,2], -"group__constantsize.html#ga1addf755829380581dd9c3c9175e376f":[7,3,3], +"group__constantsize.html#ga105bd667da91a15d113fe79be04d625c":[7,3,3], +"group__constantsize.html#ga1addf755829380581dd9c3c9175e376f":[7,3,4], +"group__constantsize.html#ga38a93d373a9dc8edc8bca83edb6af5c5":[7,3,1], "group__constantsize.html#ga7a421e302074e598527c3eb052a6a3c5":[7,3,0], -"group__constantsize.html#ga9cd44d925d34f7180922e12bbf594571":[7,3,1], -"group__constantsize.html#gadca6d340ee15b5c70695ed82d95c6cec":[7,3,4], +"group__constantsize.html#ga9cd44d925d34f7180922e12bbf594571":[7,3,2], +"group__constantsize.html#gadca6d340ee15b5c70695ed82d95c6cec":[7,3,5], "group__cpp.html":[7,14], "group__cpp.html#ga5cb4f120d1f7296074256215aa9a9e54":[7,14,5], "group__cpp.html#ga633d96e3bc7011f960df9f3b2731fc6a":[7,14,1], @@ -58,22 +59,23 @@ var NAVTREEINDEX0 = "group__cpp.html#gadd11b85c15d21d308386844b5233856c":[7,14,4], "group__cpp.html#structmi__stl__allocator":[7,14,0], "group__extended.html":[7,9], -"group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf":[7,9,11], +"group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf":[7,9,12], "group__extended.html#ga1ea64283508718d9d645c38efc2f4305":[7,9,0], +"group__extended.html#ga22890f54e5be433837069c8e97fdf379":[7,9,6], "group__extended.html#ga292a45f7dbc7cd23c5352ce1f0002816":[7,9,1], "group__extended.html#ga2a8469764c38dcaf878f36e5f50e3610":[7,9,5], -"group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece":[7,9,8], +"group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece":[7,9,9], "group__extended.html#ga421430e2226d7d468529cec457396756":[7,9,4], -"group__extended.html#ga51c47637e81df0e2f13a2d7a2dec123e":[7,9,15], -"group__extended.html#ga7f050bc6b897da82692174f5fce59cde":[7,9,7], +"group__extended.html#ga51c47637e81df0e2f13a2d7a2dec123e":[7,9,16], +"group__extended.html#ga7f050bc6b897da82692174f5fce59cde":[7,9,8], "group__extended.html#ga83fc6a688b322261e1c2deab000b0591":[7,9,2], -"group__extended.html#gaa1d55e0e894be240827e5d87ec3a1f45":[7,9,9], -"group__extended.html#gaad25050b19f30cd79397b227e0157a3f":[7,9,6], -"group__extended.html#gada899104276aac52539eb4de7c020f1f":[7,9,13], +"group__extended.html#gaa1d55e0e894be240827e5d87ec3a1f45":[7,9,10], +"group__extended.html#gaad25050b19f30cd79397b227e0157a3f":[7,9,7], +"group__extended.html#gada899104276aac52539eb4de7c020f1f":[7,9,14], "group__extended.html#gadf31cea7d0332a81c8b882cbbdbadb8d":[7,9,3], -"group__extended.html#gae5b17ff027cd2150b43a33040250cf3f":[7,9,10], -"group__extended.html#gae9ddddcf14a58d0224ef3c8778e5b057":[7,9,14], -"group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17":[7,9,12], +"group__extended.html#gae5b17ff027cd2150b43a33040250cf3f":[7,9,11], +"group__extended.html#gae9ddddcf14a58d0224ef3c8778e5b057":[7,9,15], +"group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17":[7,9,13], "group__heap.html":[7,5], "group__heap.html#ga012c5c8abe22b10043de39ff95909541":[7,5,18], "group__heap.html#ga0994f44cc595f9c1840a9af162d98597":[7,5,35], @@ -113,20 +115,21 @@ var NAVTREEINDEX0 = "group__heap.html#gae7cd171425bee04c683c65a3701f0b4a":[7,5,25], "group__heap.html#gae7ffc045c3996497a7f3a5f6fe7b8aaa":[7,5,17], "group__malloc.html":[7,0], -"group__malloc.html#ga0621af6a5e3aa384e6a1b548958bf583":[7,0,6], -"group__malloc.html#ga089c859d9eddc5f9b4bd946cd53cebee":[7,0,12], -"group__malloc.html#ga19299856216cfbb08e2628593654dfb0":[7,0,1], -"group__malloc.html#ga245ac90ebc2cfdd17de599e5fea59889":[7,0,10], -"group__malloc.html#ga486d0d26b3b3794f6d1cdb41a9aed92d":[7,0,11], -"group__malloc.html#ga4dc3a4067037b151a64629fe8a332641":[7,0,7], -"group__malloc.html#ga61f46bade3db76ca24aaafedc40de7b6":[7,0,5], +"group__malloc.html#ga0621af6a5e3aa384e6a1b548958bf583":[7,0,7], +"group__malloc.html#ga089c859d9eddc5f9b4bd946cd53cebee":[7,0,13], +"group__malloc.html#ga19299856216cfbb08e2628593654dfb0":[7,0,2], +"group__malloc.html#ga245ac90ebc2cfdd17de599e5fea59889":[7,0,11], +"group__malloc.html#ga486d0d26b3b3794f6d1cdb41a9aed92d":[7,0,12], +"group__malloc.html#ga4dc3a4067037b151a64629fe8a332641":[7,0,8], +"group__malloc.html#ga61f46bade3db76ca24aaafedc40de7b6":[7,0,6], "group__malloc.html#ga6686568014b54d1e6c7ac64a076e4f56":[7,0,0], -"group__malloc.html#ga8bddfb4a1270a0854bbcf44cb3980467":[7,0,8], -"group__malloc.html#ga94c3afcc086e85d75a57e9f76b9b71dd":[7,0,9], -"group__malloc.html#gac057927cd06c854b45fe7847e921bd47":[7,0,3], -"group__malloc.html#gae1dd97b542420c87ae085e822b1229e8":[7,0,4], -"group__malloc.html#gae6e38c4403247a7b40d80419e093bfb8":[7,0,13], -"group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95":[7,0,2], +"group__malloc.html#ga705dc7a64bffacfeeb0141501a5c35d7":[7,0,1], +"group__malloc.html#ga8bddfb4a1270a0854bbcf44cb3980467":[7,0,9], +"group__malloc.html#ga94c3afcc086e85d75a57e9f76b9b71dd":[7,0,10], +"group__malloc.html#gac057927cd06c854b45fe7847e921bd47":[7,0,4], +"group__malloc.html#gae1dd97b542420c87ae085e822b1229e8":[7,0,5], +"group__malloc.html#gae6e38c4403247a7b40d80419e093bfb8":[7,0,14], +"group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95":[7,0,3], "group__options.html":[7,11], "group__options.html#ga04180ae41b0d601421dd62ced40ca050":[7,11,2], "group__options.html#ga1dd50c7533baec4cc6c1a2e9adf05dd2":[7,11,12], @@ -189,7 +192,7 @@ var NAVTREEINDEX0 = "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafd0c5ddbc4b59fd8b5216871728167a5":[7,11,0,22], "group__posix.html":[7,13], "group__posix.html#ga06d07cf357bbac5c73ba5d0c0c421e17":[7,13,12], -"group__posix.html#ga0d28d5cf61e6bfbb18c63092939fe5c9":[7,13,7], +"group__posix.html#ga0d28d5cf61e6bfbb18c63092939fe5c9":[7,13,6], "group__posix.html#ga16570deddd559001b44953eedbad0084":[7,13,3], "group__posix.html#ga430ed1513f0571ff83be00ec58a98ee0":[7,13,2], "group__posix.html#ga4531c9e775bb3ae12db57c1ba8a5d7de":[7,13,11], @@ -197,18 +200,18 @@ var NAVTREEINDEX0 = "group__posix.html#ga644bebccdbb2821542dd8c7e7641f476":[7,13,16], "group__posix.html#ga66bcfeb4faedbb42b796bc680821ef84":[7,13,0], "group__posix.html#ga6ac6a6a8f3c96f1af24bb8d0439cbbd1":[7,13,21], -"group__posix.html#ga705dc7a64bffacfeeb0141501a5c35d7":[7,13,5], "group__posix.html#ga726867f13fd29ca36064954c0285b1d8":[7,13,14], -"group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc":[7,13,9], +"group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc":[7,13,8], +"group__posix.html#ga796602dae2a89797026f72e0c0240f32":[7,13,9], "group__posix.html#ga7b82a44094fdec4d2084eb4288a979b0":[7,13,13], "group__posix.html#ga7e1934d60a3e697950eeb48e042bfad5":[7,13,17], "group__posix.html#ga9d23ac7885fed7413c11d8e0ffa31071":[7,13,10], "group__posix.html#gaa9fd7f25c9ac3a20e89b33bd6e383fcf":[7,13,20], -"group__posix.html#gab41369c1a1da7504013a7a0b1d4dd958":[7,13,6], +"group__posix.html#gab41369c1a1da7504013a7a0b1d4dd958":[7,13,5], "group__posix.html#gacff84f226ba9feb2031b8992e5579447":[7,13,15], "group__posix.html#gad5a69c8fea96aa2b7a7c818c2130090a":[7,13,1], "group__posix.html#gadfeccb72748a2f6305474a37d9d57bce":[7,13,18], -"group__posix.html#gae01389eedab8d67341ff52e2aad80ebb":[7,13,8], +"group__posix.html#gae01389eedab8d67341ff52e2aad80ebb":[7,13,7], "group__posix.html#gaf82cbb4b4f24acf723348628451798d3":[7,13,4], "group__stats.html":[7,10], "group__stats.html#aa74fc9c40dfaef5e06dec4019c19de68":[7,10,0,1], @@ -246,8 +249,5 @@ var NAVTREEINDEX0 = "group__subproc.html#gadbc53414eb68b275588ec001ce1ddc7c":[7,8,2], "group__subproc.html#gafd2136e7f167b5cd02b6ab00bed0ac93":[7,8,8], "group__theap.html":[7,12], -"group__theap.html#ga04420ce52785019412397e4de24a984a":[7,12,9], -"group__theap.html#ga11943128dc354313c4189e72f4299dbb":[7,12,8], -"group__theap.html#ga1fc65302a212daaecb21abda96ff247c":[7,12,7], -"group__theap.html#ga78afbb07c1e0cd333c7539cf7403dfd5":[7,12,4] +"group__theap.html#ga04420ce52785019412397e4de24a984a":[7,12,9] }; diff --git a/docs/navtreeindex1.js b/docs/navtreeindex1.js index 79286c5a6..3b01ba053 100644 --- a/docs/navtreeindex1.js +++ b/docs/navtreeindex1.js @@ -1,5 +1,8 @@ var NAVTREEINDEX1 = { +"group__theap.html#ga11943128dc354313c4189e72f4299dbb":[7,12,8], +"group__theap.html#ga1fc65302a212daaecb21abda96ff247c":[7,12,7], +"group__theap.html#ga78afbb07c1e0cd333c7539cf7403dfd5":[7,12,4], "group__theap.html#ga7905a73865733da8a43339a500533180":[7,12,1], "group__theap.html#ga84503fc2bd83fbfb7f789b7d80d76f36":[7,12,6], "group__theap.html#ga8722f6ac4f638b4692e06ddfddc844f8":[7,12,0], diff --git a/docs/overrides.html b/docs/overrides.html index d5736734f..d7f7e0909 100644 --- a/docs/overrides.html +++ b/docs/overrides.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/pages.html b/docs/pages.html index c1d698676..5b13b6dfd 100644 --- a/docs/pages.html +++ b/docs/pages.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/search/all_9.js b/docs/search/all_9.js index 54d47ba9a..bf716a23b 100644 --- a/docs/search/all_9.js +++ b/docs/search/all_9.js @@ -19,7 +19,7 @@ var searchData= ['mi_5fcalloc_5faligned_16',['mi_calloc_aligned',['../group__aligned.html#ga424ef386fb1f9f8e0a86ab53f16eaaf1',1,'mimalloc-doc.h']]], ['mi_5fcalloc_5faligned_5fat_17',['mi_calloc_aligned_at',['../group__aligned.html#ga977f96bd2c5c141bcd70e6685c90d6c3',1,'mimalloc-doc.h']]], ['mi_5fcalloc_5ftp_18',['mi_calloc_tp',['../group__typed.html#gae80c47c9d4cab10961fff1a8ac98fc07',1,'mimalloc-doc.h']]], - ['mi_5fcfree_19',['mi_cfree',['../group__posix.html#ga705dc7a64bffacfeeb0141501a5c35d7',1,'mimalloc-doc.h']]], + ['mi_5fcfree_19',['mi_cfree',['../group__malloc.html#ga705dc7a64bffacfeeb0141501a5c35d7',1,'mimalloc-doc.h']]], ['mi_5fcheck_5fowned_20',['mi_check_owned',['../group__heap.html#ga628c237489c2679af84a4d0d143b3dd5',1,'mimalloc-doc.h']]], ['mi_5fcollect_21',['mi_collect',['../group__extended.html#ga421430e2226d7d468529cec457396756',1,'mimalloc-doc.h']]], ['mi_5fdebug_5fshow_5farenas_22',['mi_debug_show_arenas',['../group__arenas.html#ga98cda17aa7adeda8b213382af8e7810b',1,'mimalloc-doc.h']]], @@ -30,231 +30,234 @@ var searchData= ['mi_5ffree_27',['mi_free',['../group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95',1,'mimalloc-doc.h']]], ['mi_5ffree_5faligned_28',['mi_free_aligned',['../group__posix.html#ga0d28d5cf61e6bfbb18c63092939fe5c9',1,'mimalloc-doc.h']]], ['mi_5ffree_5fcsize_29',['mi_free_csize',['../group__constantsize.html#ga7a421e302074e598527c3eb052a6a3c5',1,'mimalloc-doc.h']]], - ['mi_5ffree_5fsize_30',['mi_free_size',['../group__posix.html#gae01389eedab8d67341ff52e2aad80ebb',1,'mimalloc-doc.h']]], - ['mi_5ffree_5fsize_5faligned_31',['mi_free_size_aligned',['../group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc',1,'mimalloc-doc.h']]], - ['mi_5ffree_5fsmall_32',['mi_free_small',['../group__extended.html#ga2a8469764c38dcaf878f36e5f50e3610',1,'mimalloc-doc.h']]], - ['mi_5ffree_5ftp_33',['mi_free_tp',['../group__typed.html#gafc80000c300f02bdd4fe695eb53ca70a',1,'mimalloc-doc.h']]], - ['mi_5fgood_5fsize_34',['mi_good_size',['../group__malloc.html#gac057927cd06c854b45fe7847e921bd47',1,'mimalloc-doc.h']]], - ['mi_5fheap_5farea_5ft_35',['mi_heap_area_t',['../group__analysis.html#structmi__heap__area__t',1,'']]], - ['mi_5fheap_5fcalloc_36',['mi_heap_calloc',['../group__heap.html#gac0098aaf231d3e9586c73136d5df95da',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcalloc_5faligned_37',['mi_heap_calloc_aligned',['../group__heap.html#gacafcc26df827c7a7de5e850217566108',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcalloc_5faligned_5fat_38',['mi_heap_calloc_aligned_at',['../group__heap.html#gaa42ec2079989c4374f2c331d9b35f4e4',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcalloc_5ftp_39',['mi_heap_calloc_tp',['../group__typed.html#ga953f22101bb354a8b6de2a6d6fda9b98',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcheck_5fowned_40',['mi_heap_check_owned',['../group__heap.html#ga0d67c1789faaa15ff366c024fcaf6377',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcollect_41',['mi_heap_collect',['../group__heap.html#ga7922f7495cde30b1984d0e6072419298',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcontains_42',['mi_heap_contains',['../group__heap.html#gac988496aea8ffc5c8bf92a8b10165fa0',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcontains_5fblock_43',['mi_heap_contains_block',['../group__heap.html#gaa862aa8ed8d57d84cae41fc1022d71af',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fdelete_44',['mi_heap_delete',['../group__heap.html#ga2ab1af8d438819b55319c7ef51d1e409',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fdestroy_45',['mi_heap_destroy',['../group__heap.html#ga9f9c0844edb9717f4feacd79116b8e0d',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fget_5fbacking_46',['mi_heap_get_backing',['../group__heap.html#gac6ac9f0e7be9ab4ff70acfc8dad1235a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fget_5fdefault_47',['mi_heap_get_default',['../group__heap.html#ga14c667a6e2c5d28762d8cb7d4e057909',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmain_48',['mi_heap_main',['../group__heap.html#ga8fc318a65dc79ee8778c6a0e52d12477',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmalloc_49',['mi_heap_malloc',['../group__heap.html#gab374e206c7034e0d899fb934e4f4a863',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmalloc_5faligned_50',['mi_heap_malloc_aligned',['../group__heap.html#ga33f4f05b7fea7af2113c62a4bf882cc5',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmalloc_5faligned_5fat_51',['mi_heap_malloc_aligned_at',['../group__heap.html#gae7ffc045c3996497a7f3a5f6fe7b8aaa',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmalloc_5fsmall_52',['mi_heap_malloc_small',['../group__heap.html#ga012c5c8abe22b10043de39ff95909541',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmalloc_5ftp_53',['mi_heap_malloc_tp',['../group__typed.html#ga02d3e85bf26aa3120132f2552c408a88',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmallocn_54',['mi_heap_mallocn',['../group__heap.html#gab0f755c0b21c387fe8e9024200faa372',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmallocn_5ftp_55',['mi_heap_mallocn_tp',['../group__typed.html#gaa58690658cc6f5dd54c99a9971d4aa7d',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fnew_56',['mi_heap_new',['../group__heap.html#gaa718bb226ec0546ba6d1b6cb32179f3a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fnew_5fex_57',['mi_heap_new_ex',['../group__arenas.html#ga3ae360583f4351aa5267ee7e43008faf',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fnew_5fin_5farena_58',['mi_heap_new_in_arena',['../group__arenas.html#gaaf2d9976576d5efd5544be12848af949',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fof_59',['mi_heap_of',['../group__heap.html#ga424b69f285109b2515631d59f5eecb1b',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frealloc_60',['mi_heap_realloc',['../group__heap.html#gac5252d6a2e510bd349e4fcb452e6a93a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frealloc_5faligned_61',['mi_heap_realloc_aligned',['../group__heap.html#gaccf8c249872f30bf1c2493a09197d734',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frealloc_5faligned_5fat_62',['mi_heap_realloc_aligned_at',['../group__heap.html#ga6df988a7219d5707f010d5f3eb0dc3f5',1,'mimalloc-doc.h']]], - ['mi_5fheap_5freallocf_63',['mi_heap_reallocf',['../group__heap.html#gae7cd171425bee04c683c65a3701f0b4a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5freallocn_64',['mi_heap_reallocn',['../group__heap.html#gaccf7bfe10ce510a000d3547d9cf7fa29',1,'mimalloc-doc.h']]], - ['mi_5fheap_5freallocn_5ftp_65',['mi_heap_reallocn_tp',['../group__typed.html#ga817e315c24133294caad4d50470ff313',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frealpath_66',['mi_heap_realpath',['../group__heap.html#ga55545a3ec6da29c5b4f62e540ecac1e2',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frecalloc_67',['mi_heap_recalloc',['../group__zeroinit.html#gad1a0d325d930eeb80f25e3fea37aacde',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frecalloc_5faligned_68',['mi_heap_recalloc_aligned',['../group__zeroinit.html#ga87ddd674bf1c67237d780d0b9e0f0f32',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frecalloc_5faligned_5fat_69',['mi_heap_recalloc_aligned_at',['../group__zeroinit.html#ga07b5bcbaf00d0d2e598c232982588496',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frecalloc_5ftp_70',['mi_heap_recalloc_tp',['../group__typed.html#ga7bf06ad296e20d1d74c90d64294eecec',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frezalloc_71',['mi_heap_rezalloc',['../group__zeroinit.html#ga8d8b7ebb24b513cd84d1a696048da60d',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frezalloc_5faligned_72',['mi_heap_rezalloc_aligned',['../group__zeroinit.html#ga5129f6dc46ee1613d918820a8a0533a7',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frezalloc_5faligned_5fat_73',['mi_heap_rezalloc_aligned_at',['../group__zeroinit.html#ga2bafa79c3f98ea74882349d44cffa5d9',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fset_5fdefault_74',['mi_heap_set_default',['../group__heap.html#ga349b677dec7da5eacdbc7a385bd62a4a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fset_5fnuma_5faffinity_75',['mi_heap_set_numa_affinity',['../group__heap.html#gaab93abbc0624f570e2900f95cac18591',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstats_5fget_76',['mi_heap_stats_get',['../group__stats.html#ga2654195cef93ed3613e98b59a19a296f',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstats_5fget_5fjson_77',['mi_heap_stats_get_json',['../group__stats.html#gacb42dede4c38c38f2014b5450c5fcba8',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstats_5fmerge_5fto_5fsubproc_78',['mi_heap_stats_merge_to_subproc',['../group__stats.html#ga5a34328f846c661aa560f4769cfc15f1',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstats_5fprint_5fout_79',['mi_heap_stats_print_out',['../group__stats.html#gafea365d7842f5f5bc1f235bbc303d585',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstrdup_80',['mi_heap_strdup',['../group__heap.html#ga5754e09ccc51dd6bc73885bb6ea21b7a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstrndup_81',['mi_heap_strndup',['../group__heap.html#gad224df78f1fbee942df8adf023e12cf3',1,'mimalloc-doc.h']]], - ['mi_5fheap_5ft_82',['mi_heap_t',['../group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2',1,'mimalloc-doc.h']]], - ['mi_5fheap_5ftheap_83',['mi_heap_theap',['../group__theap.html#ga7905a73865733da8a43339a500533180',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fvisit_5fblocks_84',['mi_heap_visit_blocks',['../group__analysis.html#gae69fcff3324f8e419af850e34cf54c46',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fvisit_5ffun_85',['mi_heap_visit_fun',['../group__subproc.html#ga7dcbc5863df9989b45e7051999448a4a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fzalloc_86',['mi_heap_zalloc',['../group__heap.html#gabebc796399619d964d8db77aa835e8c1',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fzalloc_5faligned_87',['mi_heap_zalloc_aligned',['../group__heap.html#ga6466bde8b5712aa34e081a8317f9f471',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fzalloc_5faligned_5fat_88',['mi_heap_zalloc_aligned_at',['../group__heap.html#ga484e3d01cd174f78c7e53370e5a7c819',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fzalloc_5fsmall_89',['mi_heap_zalloc_small',['../group__heap.html#ga0994f44cc595f9c1840a9af162d98597',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fzalloc_5ftp_90',['mi_heap_zalloc_tp',['../group__typed.html#ga0aaa1aa747d8863e844c37e424ed096c',1,'mimalloc-doc.h']]], - ['mi_5fis_5fin_5fheap_5fregion_91',['mi_is_in_heap_region',['../group__heap.html#ga5f071b10d4df1c3658e04e7fd67a94e6',1,'mimalloc-doc.h']]], - ['mi_5fis_5fredirected_92',['mi_is_redirected',['../group__extended.html#gaad25050b19f30cd79397b227e0157a3f',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_93',['mi_malloc',['../group__malloc.html#gae1dd97b542420c87ae085e822b1229e8',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5faligned_94',['mi_malloc_aligned',['../group__aligned.html#ga69578ff1a98ca16e1dcd02c0995cd65c',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5faligned_5fat_95',['mi_malloc_aligned_at',['../group__aligned.html#ga2022f71b95a7cd6cce1b6e07752ae8ca',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5fcsize_96',['mi_malloc_csize',['../group__constantsize.html#ga9cd44d925d34f7180922e12bbf594571',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5fgood_5fsize_97',['mi_malloc_good_size',['../group__posix.html#ga9d23ac7885fed7413c11d8e0ffa31071',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5fsize_98',['mi_malloc_size',['../group__posix.html#ga4531c9e775bb3ae12db57c1ba8a5d7de',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5fsmall_99',['mi_malloc_small',['../group__extended.html#ga7f050bc6b897da82692174f5fce59cde',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5ftp_100',['mi_malloc_tp',['../group__typed.html#ga0619a62c5fd886f1016030abe91f0557',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5fusable_5fsize_101',['mi_malloc_usable_size',['../group__posix.html#ga06d07cf357bbac5c73ba5d0c0c421e17',1,'mimalloc-doc.h']]], - ['mi_5fmallocn_102',['mi_mallocn',['../group__malloc.html#ga61f46bade3db76ca24aaafedc40de7b6',1,'mimalloc-doc.h']]], - ['mi_5fmallocn_5ftp_103',['mi_mallocn_tp',['../group__typed.html#gae5cb6e0fafc9f23169c5622e077afe8b',1,'mimalloc-doc.h']]], - ['mi_5fmanage_5fos_5fmemory_104',['mi_manage_os_memory',['../group__arenas.html#ga4c6486a1fdcd7a423b5f25fe4be8e0cf',1,'mimalloc-doc.h']]], - ['mi_5fmanage_5fos_5fmemory_5fex_105',['mi_manage_os_memory_ex',['../group__arenas.html#ga41ce8525d77bbb60f618fa1029994f6e',1,'mimalloc-doc.h']]], - ['mi_5fmbsdup_106',['mi_mbsdup',['../group__posix.html#ga7b82a44094fdec4d2084eb4288a979b0',1,'mimalloc-doc.h']]], - ['mi_5fmemalign_107',['mi_memalign',['../group__posix.html#ga726867f13fd29ca36064954c0285b1d8',1,'mimalloc-doc.h']]], - ['mi_5fnew_108',['mi_new',['../group__cpp.html#ga633d96e3bc7011f960df9f3b2731fc6a',1,'mimalloc-doc.h']]], - ['mi_5fnew_5faligned_109',['mi_new_aligned',['../group__cpp.html#ga79c54da0b4b4ce9fcc11d2f6ef6675f8',1,'mimalloc-doc.h']]], - ['mi_5fnew_5faligned_5fnothrow_110',['mi_new_aligned_nothrow',['../group__cpp.html#ga92ae00b6dd64406c7e64557711ec04b7',1,'mimalloc-doc.h']]], - ['mi_5fnew_5fn_111',['mi_new_n',['../group__cpp.html#gadd11b85c15d21d308386844b5233856c',1,'mimalloc-doc.h']]], - ['mi_5fnew_5fnothrow_112',['mi_new_nothrow',['../group__cpp.html#ga5cb4f120d1f7296074256215aa9a9e54',1,'mimalloc-doc.h']]], - ['mi_5fnew_5frealloc_113',['mi_new_realloc',['../group__cpp.html#ga6867d89baf992728e0cc20a1f47db4d0',1,'mimalloc-doc.h']]], - ['mi_5fnew_5freallocn_114',['mi_new_reallocn',['../group__cpp.html#gaace912ce086682d56f3ce9f7638d9d67',1,'mimalloc-doc.h']]], - ['mi_5foption_5fabandoned_5fpage_5fpurge_115',['mi_option_abandoned_page_purge',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca11e62ed69200a489a5be955582078c0c',1,'mimalloc-doc.h']]], - ['mi_5foption_5fabandoned_5freclaim_5fon_5ffree_116',['mi_option_abandoned_reclaim_on_free',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca009e4b5684922ce664d73d2a8e1698d9',1,'mimalloc-doc.h']]], - ['mi_5foption_5fallow_5flarge_5fos_5fpages_117',['mi_option_allow_large_os_pages',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca7cc4804ced69004fa42a9a136a9ba556',1,'mimalloc-doc.h']]], - ['mi_5foption_5fallow_5fthp_118',['mi_option_allow_thp',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca04c45931ce2c82a20d08ca1471e74087',1,'mimalloc-doc.h']]], - ['mi_5foption_5farena_5feager_5fcommit_119',['mi_option_arena_eager_commit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafd0c5ddbc4b59fd8b5216871728167a5',1,'mimalloc-doc.h']]], - ['mi_5foption_5farena_5fmax_5fobject_5fsize_120',['mi_option_arena_max_object_size',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4dee58d60bc95ce0eeef759c61fd849b',1,'mimalloc-doc.h']]], - ['mi_5foption_5farena_5fpurge_5fmult_121',['mi_option_arena_purge_mult',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca8236501f1ab45d26e6fd885d191a2b5e',1,'mimalloc-doc.h']]], - ['mi_5foption_5farena_5freserve_122',['mi_option_arena_reserve',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cab1c88e23ae290bbeec824038a97959de',1,'mimalloc-doc.h']]], - ['mi_5foption_5fdestroy_5fon_5fexit_123',['mi_option_destroy_on_exit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca6364331e305e7d3c0218b058ff3afc88',1,'mimalloc-doc.h']]], - ['mi_5foption_5fdisable_124',['mi_option_disable',['../group__options.html#gaebf6ff707a2e688ebb1a2296ca564054',1,'mimalloc-doc.h']]], - ['mi_5foption_5fdisallow_5farena_5falloc_125',['mi_option_disallow_arena_alloc',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caeae1696100e4057ffc4182730cc04e40',1,'mimalloc-doc.h']]], - ['mi_5foption_5fdisallow_5fos_5falloc_126',['mi_option_disallow_os_alloc',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cadcfb5a09580361b1be65901d2d812de6',1,'mimalloc-doc.h']]], - ['mi_5foption_5feager_5fcommit_127',['mi_option_eager_commit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca1e8de72c93da7ff22d91e1e27b52ac2b',1,'mimalloc-doc.h']]], - ['mi_5foption_5feager_5fcommit_5fdelay_128',['mi_option_eager_commit_delay',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca17a190c25be381142d87e0468c4c068c',1,'mimalloc-doc.h']]], - ['mi_5foption_5fenable_129',['mi_option_enable',['../group__options.html#ga04180ae41b0d601421dd62ced40ca050',1,'mimalloc-doc.h']]], - ['mi_5foption_5fgeneric_5fcollect_130',['mi_option_generic_collect',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca8b5815a577955fe8125f2b964f41ee7f',1,'mimalloc-doc.h']]], - ['mi_5foption_5fget_131',['mi_option_get',['../group__options.html#ga7e8af195cc81d3fa64ccf2662caa565a',1,'mimalloc-doc.h']]], - ['mi_5foption_5fget_5fclamp_132',['mi_option_get_clamp',['../group__options.html#ga96ad9c406338bd314cfe878cfc9bf723',1,'mimalloc-doc.h']]], - ['mi_5foption_5fget_5fsize_133',['mi_option_get_size',['../group__options.html#ga274db5a6ac87cc24ef0b23e7006ed02c',1,'mimalloc-doc.h']]], - ['mi_5foption_5fguarded_5fmax_134',['mi_option_guarded_max',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca96077da4e5c841edeec0c4d6e45a5ffa',1,'mimalloc-doc.h']]], - ['mi_5foption_5fguarded_5fmin_135',['mi_option_guarded_min',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca00734c528aae52784654a8db996ae62b',1,'mimalloc-doc.h']]], - ['mi_5foption_5fguarded_5fprecise_136',['mi_option_guarded_precise',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca1eaf89bb1698f988cec27b66e546760c',1,'mimalloc-doc.h']]], - ['mi_5foption_5fguarded_5fsample_5frate_137',['mi_option_guarded_sample_rate',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caeb3c75b1a838eb42106750979d0888ec',1,'mimalloc-doc.h']]], - ['mi_5foption_5fguarded_5fsample_5fseed_138',['mi_option_guarded_sample_seed',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca7b1e41ece69f9abbe5ba81d9ea7a3dc0',1,'mimalloc-doc.h']]], - ['mi_5foption_5fis_5fenabled_139',['mi_option_is_enabled',['../group__options.html#ga459ad98f18b3fc9275474807fe0ca188',1,'mimalloc-doc.h']]], - ['mi_5foption_5fmax_5ferrors_140',['mi_option_max_errors',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caec6ecbe29d46a48205ed8823a8a52a6a',1,'mimalloc-doc.h']]], - ['mi_5foption_5fmax_5fsegment_5freclaim_141',['mi_option_max_segment_reclaim',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caa9ad9005d7017c8c30ad2d6ba31db909',1,'mimalloc-doc.h']]], - ['mi_5foption_5fmax_5fvabits_142',['mi_option_max_vabits',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caabf8c9793d421ce28361b6d93c432de9',1,'mimalloc-doc.h']]], - ['mi_5foption_5fmax_5fwarnings_143',['mi_option_max_warnings',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caf9595921087e942602ee079158762665',1,'mimalloc-doc.h']]], - ['mi_5foption_5fminimal_5fpurge_5fsize_144',['mi_option_minimal_purge_size',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca5635112095936356425d9a01910afff7',1,'mimalloc-doc.h']]], - ['mi_5foption_5fos_5ftag_145',['mi_option_os_tag',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4b74ae2a69e445de6c2361b73c1d14bf',1,'mimalloc-doc.h']]], - ['mi_5foption_5fpage_5fcommit_5fon_5fdemand_146',['mi_option_page_commit_on_demand',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca679d9ee91221bffba4d5aafe488a8d7f',1,'mimalloc-doc.h']]], - ['mi_5foption_5fpage_5fcross_5fthread_5fmax_5freclaim_147',['mi_option_page_cross_thread_max_reclaim',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca671e806447c15a53c7d593afdd8d45c5',1,'mimalloc-doc.h']]], - ['mi_5foption_5fpage_5ffull_5fretain_148',['mi_option_page_full_retain',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caeede7d0652e391940357e1c054d29829',1,'mimalloc-doc.h']]], - ['mi_5foption_5fpage_5fmax_5fcandidates_149',['mi_option_page_max_candidates',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cad13382757101aa4fbc4984fa0f917133',1,'mimalloc-doc.h']]], - ['mi_5foption_5fpage_5fmax_5freclaim_150',['mi_option_page_max_reclaim',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca11a13739488294318ffc03eea378f5a4',1,'mimalloc-doc.h']]], - ['mi_5foption_5fpage_5freclaim_5fon_5ffree_151',['mi_option_page_reclaim_on_free',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cac16e3f838e861338fb2357b430f6974c',1,'mimalloc-doc.h']]], - ['mi_5foption_5fpagemap_5fcommit_152',['mi_option_pagemap_commit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caa88f56e3bccce85542dc2b3297024236',1,'mimalloc-doc.h']]], - ['mi_5foption_5fpurge_5fdecommits_153',['mi_option_purge_decommits',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca9d15c5e3d2115eef681c17e4dd5ab9a4',1,'mimalloc-doc.h']]], - ['mi_5foption_5fpurge_5fdelay_154',['mi_option_purge_delay',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cadd351e615acd8563529c20a347be7290',1,'mimalloc-doc.h']]], - ['mi_5foption_5fpurge_5fextend_5fdelay_155',['mi_option_purge_extend_delay',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca02005f164bdf03f5f00c5be726adf487',1,'mimalloc-doc.h']]], - ['mi_5foption_5freserve_5fhuge_5fos_5fpages_156',['mi_option_reserve_huge_os_pages',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caca7ed041be3b0b9d0b82432c7bf41af2',1,'mimalloc-doc.h']]], - ['mi_5foption_5freserve_5fhuge_5fos_5fpages_5fat_157',['mi_option_reserve_huge_os_pages_at',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caa13e7926d4339d2aa6fbf61d4473fd5c',1,'mimalloc-doc.h']]], - ['mi_5foption_5freserve_5fos_5fmemory_158',['mi_option_reserve_os_memory',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafbf4999c828cf79a0fb2de65d23f7333',1,'mimalloc-doc.h']]], - ['mi_5foption_5fretry_5fon_5foom_159',['mi_option_retry_on_oom',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca8f51df355bf6651db899e6085b54865e',1,'mimalloc-doc.h']]], - ['mi_5foption_5fset_160',['mi_option_set',['../group__options.html#gaf84921c32375e25754dc2ee6a911fa60',1,'mimalloc-doc.h']]], - ['mi_5foption_5fset_5fdefault_161',['mi_option_set_default',['../group__options.html#ga7ef623e440e6e5545cb08c94e71e4b90',1,'mimalloc-doc.h']]], - ['mi_5foption_5fset_5fenabled_162',['mi_option_set_enabled',['../group__options.html#ga9a13d05fcb77489cb06d4d017ebd8bed',1,'mimalloc-doc.h']]], - ['mi_5foption_5fset_5fenabled_5fdefault_163',['mi_option_set_enabled_default',['../group__options.html#ga65518b69ec5d32336b50e07f74b3f629',1,'mimalloc-doc.h']]], - ['mi_5foption_5fshow_5ferrors_164',['mi_option_show_errors',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafbf4822e5c00732c5984b32a032837f0',1,'mimalloc-doc.h']]], - ['mi_5foption_5fshow_5fstats_165',['mi_option_show_stats',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0957ef73b2550764b4840edf48422fda',1,'mimalloc-doc.h']]], - ['mi_5foption_5ft_166',['mi_option_t',['../group__options.html#gafebf7ed116adb38ae5218bc3ce06884c',1,'mimalloc-doc.h']]], - ['mi_5foption_5ftarget_5fsegments_5fper_5fthread_167',['mi_option_target_segments_per_thread',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca874f36a7a1e51f7baee4a78b2830b643',1,'mimalloc-doc.h']]], - ['mi_5foption_5fuse_5fnuma_5fnodes_168',['mi_option_use_numa_nodes',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0ac33a18f6b659fcfaf44efb0bab1b74',1,'mimalloc-doc.h']]], - ['mi_5foption_5fverbose_169',['mi_option_verbose',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca7c8b7bf5281c581bad64f5daa6442777',1,'mimalloc-doc.h']]], - ['mi_5foption_5fvisit_5fabandoned_170',['mi_option_visit_abandoned',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca38c67733a3956a1f4eeaca89fab9e78e',1,'mimalloc-doc.h']]], - ['mi_5foptions_5fprint_171',['mi_options_print',['../group__options.html#gaecfcd3ed90af99932670d881de1fa8f1',1,'mimalloc-doc.h']]], - ['mi_5foptions_5fprint_5fout_172',['mi_options_print_out',['../group__options.html#ga1dd50c7533baec4cc6c1a2e9adf05dd2',1,'mimalloc-doc.h']]], - ['mi_5foutput_5ffun_173',['mi_output_fun',['../group__extended.html#gadf31cea7d0332a81c8b882cbbdbadb8d',1,'mimalloc-doc.h']]], - ['mi_5fposix_5fmemalign_174',['mi_posix_memalign',['../group__posix.html#gacff84f226ba9feb2031b8992e5579447',1,'mimalloc-doc.h']]], - ['mi_5fprocess_5finfo_175',['mi_process_info',['../group__stats.html#ga7d862c2affd5790381da14eb102a364d',1,'mimalloc-doc.h']]], - ['mi_5fprocess_5finfo_5fprint_176',['mi_process_info_print',['../group__stats.html#gaf887e7aa75f13242c4e7ab95d8390536',1,'mimalloc-doc.h']]], - ['mi_5fprocess_5finfo_5fprint_5fout_177',['mi_process_info_print_out',['../group__stats.html#ga03ac88d3efee2ae7c34f5340502f4732',1,'mimalloc-doc.h']]], - ['mi_5fpvalloc_178',['mi_pvalloc',['../group__posix.html#ga644bebccdbb2821542dd8c7e7641f476',1,'mimalloc-doc.h']]], - ['mi_5frealloc_179',['mi_realloc',['../group__malloc.html#ga0621af6a5e3aa384e6a1b548958bf583',1,'mimalloc-doc.h']]], - ['mi_5frealloc_5faligned_180',['mi_realloc_aligned',['../group__aligned.html#ga5d7a46d054b4d7abe9d8d2474add2edf',1,'mimalloc-doc.h']]], - ['mi_5frealloc_5faligned_5fat_181',['mi_realloc_aligned_at',['../group__aligned.html#gad06dcf2bb8faadb2c8ea61ee5d24bbf6',1,'mimalloc-doc.h']]], - ['mi_5freallocarr_182',['mi_reallocarr',['../group__posix.html#ga7e1934d60a3e697950eeb48e042bfad5',1,'mimalloc-doc.h']]], - ['mi_5freallocarray_183',['mi_reallocarray',['../group__posix.html#gadfeccb72748a2f6305474a37d9d57bce',1,'mimalloc-doc.h']]], - ['mi_5freallocf_184',['mi_reallocf',['../group__malloc.html#ga4dc3a4067037b151a64629fe8a332641',1,'mimalloc-doc.h']]], - ['mi_5freallocn_185',['mi_reallocn',['../group__malloc.html#ga8bddfb4a1270a0854bbcf44cb3980467',1,'mimalloc-doc.h']]], - ['mi_5freallocn_5ftp_186',['mi_reallocn_tp',['../group__typed.html#ga1158b49a55dfa81f58a4426a7578f523',1,'mimalloc-doc.h']]], - ['mi_5frealpath_187',['mi_realpath',['../group__malloc.html#ga94c3afcc086e85d75a57e9f76b9b71dd',1,'mimalloc-doc.h']]], - ['mi_5frecalloc_188',['mi_recalloc',['../group__zeroinit.html#ga23a0fbb452b5dce8e31fab1a1958cacc',1,'mimalloc-doc.h']]], - ['mi_5frecalloc_5faligned_189',['mi_recalloc_aligned',['../group__zeroinit.html#ga3e2169b48683aa0ab64f813fd68d839e',1,'mimalloc-doc.h']]], - ['mi_5frecalloc_5faligned_5fat_190',['mi_recalloc_aligned_at',['../group__zeroinit.html#gaae25e4ddedd4e0fb61b1a8bd5d452750',1,'mimalloc-doc.h']]], - ['mi_5fregister_5fdeferred_5ffree_191',['mi_register_deferred_free',['../group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece',1,'mimalloc-doc.h']]], - ['mi_5fregister_5ferror_192',['mi_register_error',['../group__extended.html#gaa1d55e0e894be240827e5d87ec3a1f45',1,'mimalloc-doc.h']]], - ['mi_5fregister_5foutput_193',['mi_register_output',['../group__extended.html#gae5b17ff027cd2150b43a33040250cf3f',1,'mimalloc-doc.h']]], - ['mi_5freserve_5fhuge_5fos_5fpages_5fat_194',['mi_reserve_huge_os_pages_at',['../group__arenas.html#ga7795a13d20087447281858d2c771cca1',1,'mimalloc-doc.h']]], - ['mi_5freserve_5fhuge_5fos_5fpages_5fat_5fex_195',['mi_reserve_huge_os_pages_at_ex',['../group__arenas.html#ga591aab1c2bc2ca920e33f0f9f9cb5c52',1,'mimalloc-doc.h']]], - ['mi_5freserve_5fhuge_5fos_5fpages_5finterleave_196',['mi_reserve_huge_os_pages_interleave',['../group__arenas.html#ga3132f521fb756fc0e8ec0b74fb58df50',1,'mimalloc-doc.h']]], - ['mi_5freserve_5fos_5fmemory_197',['mi_reserve_os_memory',['../group__arenas.html#ga00ec3324b6b2591c7fe3677baa30a767',1,'mimalloc-doc.h']]], - ['mi_5freserve_5fos_5fmemory_5fex_198',['mi_reserve_os_memory_ex',['../group__arenas.html#ga32f519797fd9a81acb4f52d36e6d751b',1,'mimalloc-doc.h']]], - ['mi_5frezalloc_199',['mi_rezalloc',['../group__zeroinit.html#gadfd34cd7b4f2bbda7ae06367a6360756',1,'mimalloc-doc.h']]], - ['mi_5frezalloc_5faligned_200',['mi_rezalloc_aligned',['../group__zeroinit.html#ga4d02404fe1e7db00beb65f185e012caa',1,'mimalloc-doc.h']]], - ['mi_5frezalloc_5faligned_5fat_201',['mi_rezalloc_aligned_at',['../group__zeroinit.html#ga6843a88285bbfcc3bdfccc60aafd1270',1,'mimalloc-doc.h']]], - ['mi_5fsmall_5fsize_5fmax_202',['MI_SMALL_SIZE_MAX',['../group__extended.html#ga1ea64283508718d9d645c38efc2f4305',1,'mimalloc-doc.h']]], - ['mi_5fstat_5fversion_203',['MI_STAT_VERSION',['../group__stats.html#gac4411cf3eed23719e511b9e1128888e0',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fas_5fjson_204',['mi_stats_as_json',['../group__stats.html#ga6ad266c70a0eabf6c26248aed1af6fa1',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fget_205',['mi_stats_get',['../group__stats.html#gaa26d5060ad21b1331a150bb92f6f7086',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fget_5fbin_5fsize_206',['mi_stats_get_bin_size',['../group__stats.html#gadecd549d1a7216af596322ac27e78b0d',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fget_5fjson_207',['mi_stats_get_json',['../group__stats.html#gadaa3be15899cc82e314fa7d3f8e2afbd',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fmerge_208',['mi_stats_merge',['../group__stats.html#ga854b1de8cb067c7316286c28b2fcd3d1',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fprint_209',['mi_stats_print',['../group__stats.html#ga2d126e5c62d3badc35445e5d84166df2',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fprint_5fout_210',['mi_stats_print_out',['../group__stats.html#ga537f13b299ddf801e49a5a94fde02c79',1,'mimalloc-doc.h']]], - ['mi_5fstats_5freset_211',['mi_stats_reset',['../group__stats.html#ga3bb8468b8cfcc6e2a61d98aee85c5f99',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fs_212',['mi_stats_s',['../group__stats.html#structmi__stats__s',1,'']]], - ['mi_5fstats_5ft_5fdecl_213',['mi_stats_t_decl',['../group__stats.html#ga961d0f9f0327ebc9bd8a0b84f6dcb410',1,'mimalloc-doc.h']]], - ['mi_5fstl_5fallocator_214',['mi_stl_allocator',['../group__cpp.html#structmi__stl__allocator',1,'']]], - ['mi_5fstrdup_215',['mi_strdup',['../group__malloc.html#ga245ac90ebc2cfdd17de599e5fea59889',1,'mimalloc-doc.h']]], - ['mi_5fstrndup_216',['mi_strndup',['../group__malloc.html#ga486d0d26b3b3794f6d1cdb41a9aed92d',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fadd_5fcurrent_5fthread_217',['mi_subproc_add_current_thread',['../group__subproc.html#gadbc53414eb68b275588ec001ce1ddc7c',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fcurrent_218',['mi_subproc_current',['../group__subproc.html#gaabc4db6585bf16099e43e60d64364950',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fdelete_219',['mi_subproc_delete',['../group__subproc.html#gaa7d263e9429bac9ac8345c9d25de610e',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fdestroy_220',['mi_subproc_destroy',['../group__subproc.html#gada12e4d9bd382935c398ec324d0391f9',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fheap_5fstats_5fprint_5fout_221',['mi_subproc_heap_stats_print_out',['../group__stats.html#ga19f1a04bd972e11e4f3b586f25229d5b',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fid_5ft_222',['mi_subproc_id_t',['../group__subproc.html#ga8c0bcd1fee27c7641e9c3c0d991b3b7d',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fmain_223',['mi_subproc_main',['../group__subproc.html#ga2ecba0d7ebdc99e71bb985c4a1609806',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fnew_224',['mi_subproc_new',['../group__subproc.html#ga8068cac328e41fa2170faef707315243',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fstats_5fget_225',['mi_subproc_stats_get',['../group__stats.html#ga5ec3f9058eec804924711ab38ba64b51',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fstats_5fget_5fjson_226',['mi_subproc_stats_get_json',['../group__stats.html#gad1cf918f08b6506e65ae134423477a0b',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fstats_5fprint_5fout_227',['mi_subproc_stats_print_out',['../group__stats.html#ga59ec89969837db414a6bce8b58915624',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fvisit_5fheaps_228',['mi_subproc_visit_heaps',['../group__subproc.html#gafd2136e7f167b5cd02b6ab00bed0ac93',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fcalloc_229',['mi_theap_calloc',['../group__theap.html#gadbf8f27bfe9edf7834e19d32cab63edc',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fcollect_230',['mi_theap_collect',['../group__theap.html#ga9377a43095b8dd14996613ceb73d9a32',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fget_5fdefault_231',['mi_theap_get_default',['../group__theap.html#ga78afbb07c1e0cd333c7539cf7403dfd5',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fmalloc_232',['mi_theap_malloc',['../group__theap.html#gac7308e029c59e6675dd5ab5ec54f304a',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fmalloc_5faligned_233',['mi_theap_malloc_aligned',['../group__theap.html#ga84503fc2bd83fbfb7f789b7d80d76f36',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fmalloc_5fcsize_234',['mi_theap_malloc_csize',['../group__constantsize.html#ga105bd667da91a15d113fe79be04d625c',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fmalloc_5fsmall_235',['mi_theap_malloc_small',['../group__theap.html#ga1fc65302a212daaecb21abda96ff247c',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5frealloc_236',['mi_theap_realloc',['../group__theap.html#ga11943128dc354313c4189e72f4299dbb',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fset_5fdefault_237',['mi_theap_set_default',['../group__theap.html#ga04420ce52785019412397e4de24a984a',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5ft_238',['mi_theap_t',['../group__theap.html#ga8722f6ac4f638b4692e06ddfddc844f8',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fzalloc_239',['mi_theap_zalloc',['../group__theap.html#gaa7fd973dcd8c75eb05707bdeffbc06f7',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fzalloc_5fcsize_240',['mi_theap_zalloc_csize',['../group__constantsize.html#ga1addf755829380581dd9c3c9175e376f',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fzalloc_5fsmall_241',['mi_theap_zalloc_small',['../group__theap.html#gaa85fccf9d40af3e826c5932aded1d534',1,'mimalloc-doc.h']]], - ['mi_5fthread_5fdone_242',['mi_thread_done',['../group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf',1,'mimalloc-doc.h']]], - ['mi_5fthread_5finit_243',['mi_thread_init',['../group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17',1,'mimalloc-doc.h']]], - ['mi_5fthread_5fset_5fin_5fthreadpool_244',['mi_thread_set_in_threadpool',['../group__extended.html#gada899104276aac52539eb4de7c020f1f',1,'mimalloc-doc.h']]], - ['mi_5fusable_5fsize_245',['mi_usable_size',['../group__malloc.html#ga089c859d9eddc5f9b4bd946cd53cebee',1,'mimalloc-doc.h']]], - ['mi_5fvalloc_246',['mi_valloc',['../group__posix.html#ga50cafb9722020402f065de93799f64ca',1,'mimalloc-doc.h']]], - ['mi_5fversion_247',['mi_version',['../group__extended.html#gae9ddddcf14a58d0224ef3c8778e5b057',1,'mimalloc-doc.h']]], - ['mi_5fwcsdup_248',['mi_wcsdup',['../group__posix.html#gaa9fd7f25c9ac3a20e89b33bd6e383fcf',1,'mimalloc-doc.h']]], - ['mi_5fwdupenv_5fs_249',['mi_wdupenv_s',['../group__posix.html#ga6ac6a6a8f3c96f1af24bb8d0439cbbd1',1,'mimalloc-doc.h']]], - ['mi_5fzalloc_250',['mi_zalloc',['../group__malloc.html#gae6e38c4403247a7b40d80419e093bfb8',1,'mimalloc-doc.h']]], - ['mi_5fzalloc_5faligned_251',['mi_zalloc_aligned',['../group__aligned.html#gaac7d0beb782f9b9ac31f47492b130f82',1,'mimalloc-doc.h']]], - ['mi_5fzalloc_5faligned_5fat_252',['mi_zalloc_aligned_at',['../group__aligned.html#ga7c1778805ce50ebbf02ccbd5e39d5dba',1,'mimalloc-doc.h']]], - ['mi_5fzalloc_5fcsize_253',['mi_zalloc_csize',['../group__constantsize.html#gadca6d340ee15b5c70695ed82d95c6cec',1,'mimalloc-doc.h']]], - ['mi_5fzalloc_5fsmall_254',['mi_zalloc_small',['../group__extended.html#ga51c47637e81df0e2f13a2d7a2dec123e',1,'mimalloc-doc.h']]], - ['mi_5fzalloc_5ftp_255',['mi_zalloc_tp',['../group__typed.html#gac77a61bdaf680a803785fe307820b48c',1,'mimalloc-doc.h']]], - ['modes_256',['Build Modes',['../modes.html',1,'']]] + ['mi_5ffree_5fcsize_5fnonnull_30',['mi_free_csize_nonnull',['../group__constantsize.html#ga38a93d373a9dc8edc8bca83edb6af5c5',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsize_31',['mi_free_size',['../group__posix.html#gae01389eedab8d67341ff52e2aad80ebb',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsize_5faligned_32',['mi_free_size_aligned',['../group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsize_5fnonnull_33',['mi_free_size_nonnull',['../group__posix.html#ga796602dae2a89797026f72e0c0240f32',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsmall_34',['mi_free_small',['../group__extended.html#ga2a8469764c38dcaf878f36e5f50e3610',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsmall_5fnonnull_35',['mi_free_small_nonnull',['../group__extended.html#ga22890f54e5be433837069c8e97fdf379',1,'mimalloc-doc.h']]], + ['mi_5ffree_5ftp_36',['mi_free_tp',['../group__typed.html#gafc80000c300f02bdd4fe695eb53ca70a',1,'mimalloc-doc.h']]], + ['mi_5fgood_5fsize_37',['mi_good_size',['../group__malloc.html#gac057927cd06c854b45fe7847e921bd47',1,'mimalloc-doc.h']]], + ['mi_5fheap_5farea_5ft_38',['mi_heap_area_t',['../group__analysis.html#structmi__heap__area__t',1,'']]], + ['mi_5fheap_5fcalloc_39',['mi_heap_calloc',['../group__heap.html#gac0098aaf231d3e9586c73136d5df95da',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_5faligned_40',['mi_heap_calloc_aligned',['../group__heap.html#gacafcc26df827c7a7de5e850217566108',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_5faligned_5fat_41',['mi_heap_calloc_aligned_at',['../group__heap.html#gaa42ec2079989c4374f2c331d9b35f4e4',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_5ftp_42',['mi_heap_calloc_tp',['../group__typed.html#ga953f22101bb354a8b6de2a6d6fda9b98',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcheck_5fowned_43',['mi_heap_check_owned',['../group__heap.html#ga0d67c1789faaa15ff366c024fcaf6377',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcollect_44',['mi_heap_collect',['../group__heap.html#ga7922f7495cde30b1984d0e6072419298',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcontains_45',['mi_heap_contains',['../group__heap.html#gac988496aea8ffc5c8bf92a8b10165fa0',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcontains_5fblock_46',['mi_heap_contains_block',['../group__heap.html#gaa862aa8ed8d57d84cae41fc1022d71af',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fdelete_47',['mi_heap_delete',['../group__heap.html#ga2ab1af8d438819b55319c7ef51d1e409',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fdestroy_48',['mi_heap_destroy',['../group__heap.html#ga9f9c0844edb9717f4feacd79116b8e0d',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fget_5fbacking_49',['mi_heap_get_backing',['../group__heap.html#gac6ac9f0e7be9ab4ff70acfc8dad1235a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fget_5fdefault_50',['mi_heap_get_default',['../group__heap.html#ga14c667a6e2c5d28762d8cb7d4e057909',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmain_51',['mi_heap_main',['../group__heap.html#ga8fc318a65dc79ee8778c6a0e52d12477',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_52',['mi_heap_malloc',['../group__heap.html#gab374e206c7034e0d899fb934e4f4a863',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5faligned_53',['mi_heap_malloc_aligned',['../group__heap.html#ga33f4f05b7fea7af2113c62a4bf882cc5',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5faligned_5fat_54',['mi_heap_malloc_aligned_at',['../group__heap.html#gae7ffc045c3996497a7f3a5f6fe7b8aaa',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5fsmall_55',['mi_heap_malloc_small',['../group__heap.html#ga012c5c8abe22b10043de39ff95909541',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5ftp_56',['mi_heap_malloc_tp',['../group__typed.html#ga02d3e85bf26aa3120132f2552c408a88',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmallocn_57',['mi_heap_mallocn',['../group__heap.html#gab0f755c0b21c387fe8e9024200faa372',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmallocn_5ftp_58',['mi_heap_mallocn_tp',['../group__typed.html#gaa58690658cc6f5dd54c99a9971d4aa7d',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fnew_59',['mi_heap_new',['../group__heap.html#gaa718bb226ec0546ba6d1b6cb32179f3a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fnew_5fex_60',['mi_heap_new_ex',['../group__arenas.html#ga3ae360583f4351aa5267ee7e43008faf',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fnew_5fin_5farena_61',['mi_heap_new_in_arena',['../group__arenas.html#gaaf2d9976576d5efd5544be12848af949',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fof_62',['mi_heap_of',['../group__heap.html#ga424b69f285109b2515631d59f5eecb1b',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_63',['mi_heap_realloc',['../group__heap.html#gac5252d6a2e510bd349e4fcb452e6a93a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_5faligned_64',['mi_heap_realloc_aligned',['../group__heap.html#gaccf8c249872f30bf1c2493a09197d734',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_5faligned_5fat_65',['mi_heap_realloc_aligned_at',['../group__heap.html#ga6df988a7219d5707f010d5f3eb0dc3f5',1,'mimalloc-doc.h']]], + ['mi_5fheap_5freallocf_66',['mi_heap_reallocf',['../group__heap.html#gae7cd171425bee04c683c65a3701f0b4a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5freallocn_67',['mi_heap_reallocn',['../group__heap.html#gaccf7bfe10ce510a000d3547d9cf7fa29',1,'mimalloc-doc.h']]], + ['mi_5fheap_5freallocn_5ftp_68',['mi_heap_reallocn_tp',['../group__typed.html#ga817e315c24133294caad4d50470ff313',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealpath_69',['mi_heap_realpath',['../group__heap.html#ga55545a3ec6da29c5b4f62e540ecac1e2',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_70',['mi_heap_recalloc',['../group__zeroinit.html#gad1a0d325d930eeb80f25e3fea37aacde',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_5faligned_71',['mi_heap_recalloc_aligned',['../group__zeroinit.html#ga87ddd674bf1c67237d780d0b9e0f0f32',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_5faligned_5fat_72',['mi_heap_recalloc_aligned_at',['../group__zeroinit.html#ga07b5bcbaf00d0d2e598c232982588496',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_5ftp_73',['mi_heap_recalloc_tp',['../group__typed.html#ga7bf06ad296e20d1d74c90d64294eecec',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_74',['mi_heap_rezalloc',['../group__zeroinit.html#ga8d8b7ebb24b513cd84d1a696048da60d',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_5faligned_75',['mi_heap_rezalloc_aligned',['../group__zeroinit.html#ga5129f6dc46ee1613d918820a8a0533a7',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_5faligned_5fat_76',['mi_heap_rezalloc_aligned_at',['../group__zeroinit.html#ga2bafa79c3f98ea74882349d44cffa5d9',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fset_5fdefault_77',['mi_heap_set_default',['../group__heap.html#ga349b677dec7da5eacdbc7a385bd62a4a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fset_5fnuma_5faffinity_78',['mi_heap_set_numa_affinity',['../group__heap.html#gaab93abbc0624f570e2900f95cac18591',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstats_5fget_79',['mi_heap_stats_get',['../group__stats.html#ga2654195cef93ed3613e98b59a19a296f',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstats_5fget_5fjson_80',['mi_heap_stats_get_json',['../group__stats.html#gacb42dede4c38c38f2014b5450c5fcba8',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstats_5fmerge_5fto_5fsubproc_81',['mi_heap_stats_merge_to_subproc',['../group__stats.html#ga5a34328f846c661aa560f4769cfc15f1',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstats_5fprint_5fout_82',['mi_heap_stats_print_out',['../group__stats.html#gafea365d7842f5f5bc1f235bbc303d585',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstrdup_83',['mi_heap_strdup',['../group__heap.html#ga5754e09ccc51dd6bc73885bb6ea21b7a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstrndup_84',['mi_heap_strndup',['../group__heap.html#gad224df78f1fbee942df8adf023e12cf3',1,'mimalloc-doc.h']]], + ['mi_5fheap_5ft_85',['mi_heap_t',['../group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2',1,'mimalloc-doc.h']]], + ['mi_5fheap_5ftheap_86',['mi_heap_theap',['../group__theap.html#ga7905a73865733da8a43339a500533180',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fvisit_5fblocks_87',['mi_heap_visit_blocks',['../group__analysis.html#gae69fcff3324f8e419af850e34cf54c46',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fvisit_5ffun_88',['mi_heap_visit_fun',['../group__subproc.html#ga7dcbc5863df9989b45e7051999448a4a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_89',['mi_heap_zalloc',['../group__heap.html#gabebc796399619d964d8db77aa835e8c1',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5faligned_90',['mi_heap_zalloc_aligned',['../group__heap.html#ga6466bde8b5712aa34e081a8317f9f471',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5faligned_5fat_91',['mi_heap_zalloc_aligned_at',['../group__heap.html#ga484e3d01cd174f78c7e53370e5a7c819',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5fsmall_92',['mi_heap_zalloc_small',['../group__heap.html#ga0994f44cc595f9c1840a9af162d98597',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5ftp_93',['mi_heap_zalloc_tp',['../group__typed.html#ga0aaa1aa747d8863e844c37e424ed096c',1,'mimalloc-doc.h']]], + ['mi_5fis_5fin_5fheap_5fregion_94',['mi_is_in_heap_region',['../group__heap.html#ga5f071b10d4df1c3658e04e7fd67a94e6',1,'mimalloc-doc.h']]], + ['mi_5fis_5fredirected_95',['mi_is_redirected',['../group__extended.html#gaad25050b19f30cd79397b227e0157a3f',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_96',['mi_malloc',['../group__malloc.html#gae1dd97b542420c87ae085e822b1229e8',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5faligned_97',['mi_malloc_aligned',['../group__aligned.html#ga69578ff1a98ca16e1dcd02c0995cd65c',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5faligned_5fat_98',['mi_malloc_aligned_at',['../group__aligned.html#ga2022f71b95a7cd6cce1b6e07752ae8ca',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fcsize_99',['mi_malloc_csize',['../group__constantsize.html#ga9cd44d925d34f7180922e12bbf594571',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fgood_5fsize_100',['mi_malloc_good_size',['../group__posix.html#ga9d23ac7885fed7413c11d8e0ffa31071',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fsize_101',['mi_malloc_size',['../group__posix.html#ga4531c9e775bb3ae12db57c1ba8a5d7de',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fsmall_102',['mi_malloc_small',['../group__extended.html#ga7f050bc6b897da82692174f5fce59cde',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5ftp_103',['mi_malloc_tp',['../group__typed.html#ga0619a62c5fd886f1016030abe91f0557',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fusable_5fsize_104',['mi_malloc_usable_size',['../group__posix.html#ga06d07cf357bbac5c73ba5d0c0c421e17',1,'mimalloc-doc.h']]], + ['mi_5fmallocn_105',['mi_mallocn',['../group__malloc.html#ga61f46bade3db76ca24aaafedc40de7b6',1,'mimalloc-doc.h']]], + ['mi_5fmallocn_5ftp_106',['mi_mallocn_tp',['../group__typed.html#gae5cb6e0fafc9f23169c5622e077afe8b',1,'mimalloc-doc.h']]], + ['mi_5fmanage_5fos_5fmemory_107',['mi_manage_os_memory',['../group__arenas.html#ga4c6486a1fdcd7a423b5f25fe4be8e0cf',1,'mimalloc-doc.h']]], + ['mi_5fmanage_5fos_5fmemory_5fex_108',['mi_manage_os_memory_ex',['../group__arenas.html#ga41ce8525d77bbb60f618fa1029994f6e',1,'mimalloc-doc.h']]], + ['mi_5fmbsdup_109',['mi_mbsdup',['../group__posix.html#ga7b82a44094fdec4d2084eb4288a979b0',1,'mimalloc-doc.h']]], + ['mi_5fmemalign_110',['mi_memalign',['../group__posix.html#ga726867f13fd29ca36064954c0285b1d8',1,'mimalloc-doc.h']]], + ['mi_5fnew_111',['mi_new',['../group__cpp.html#ga633d96e3bc7011f960df9f3b2731fc6a',1,'mimalloc-doc.h']]], + ['mi_5fnew_5faligned_112',['mi_new_aligned',['../group__cpp.html#ga79c54da0b4b4ce9fcc11d2f6ef6675f8',1,'mimalloc-doc.h']]], + ['mi_5fnew_5faligned_5fnothrow_113',['mi_new_aligned_nothrow',['../group__cpp.html#ga92ae00b6dd64406c7e64557711ec04b7',1,'mimalloc-doc.h']]], + ['mi_5fnew_5fn_114',['mi_new_n',['../group__cpp.html#gadd11b85c15d21d308386844b5233856c',1,'mimalloc-doc.h']]], + ['mi_5fnew_5fnothrow_115',['mi_new_nothrow',['../group__cpp.html#ga5cb4f120d1f7296074256215aa9a9e54',1,'mimalloc-doc.h']]], + ['mi_5fnew_5frealloc_116',['mi_new_realloc',['../group__cpp.html#ga6867d89baf992728e0cc20a1f47db4d0',1,'mimalloc-doc.h']]], + ['mi_5fnew_5freallocn_117',['mi_new_reallocn',['../group__cpp.html#gaace912ce086682d56f3ce9f7638d9d67',1,'mimalloc-doc.h']]], + ['mi_5foption_5fabandoned_5fpage_5fpurge_118',['mi_option_abandoned_page_purge',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca11e62ed69200a489a5be955582078c0c',1,'mimalloc-doc.h']]], + ['mi_5foption_5fabandoned_5freclaim_5fon_5ffree_119',['mi_option_abandoned_reclaim_on_free',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca009e4b5684922ce664d73d2a8e1698d9',1,'mimalloc-doc.h']]], + ['mi_5foption_5fallow_5flarge_5fos_5fpages_120',['mi_option_allow_large_os_pages',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca7cc4804ced69004fa42a9a136a9ba556',1,'mimalloc-doc.h']]], + ['mi_5foption_5fallow_5fthp_121',['mi_option_allow_thp',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca04c45931ce2c82a20d08ca1471e74087',1,'mimalloc-doc.h']]], + ['mi_5foption_5farena_5feager_5fcommit_122',['mi_option_arena_eager_commit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafd0c5ddbc4b59fd8b5216871728167a5',1,'mimalloc-doc.h']]], + ['mi_5foption_5farena_5fmax_5fobject_5fsize_123',['mi_option_arena_max_object_size',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4dee58d60bc95ce0eeef759c61fd849b',1,'mimalloc-doc.h']]], + ['mi_5foption_5farena_5fpurge_5fmult_124',['mi_option_arena_purge_mult',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca8236501f1ab45d26e6fd885d191a2b5e',1,'mimalloc-doc.h']]], + ['mi_5foption_5farena_5freserve_125',['mi_option_arena_reserve',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cab1c88e23ae290bbeec824038a97959de',1,'mimalloc-doc.h']]], + ['mi_5foption_5fdestroy_5fon_5fexit_126',['mi_option_destroy_on_exit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca6364331e305e7d3c0218b058ff3afc88',1,'mimalloc-doc.h']]], + ['mi_5foption_5fdisable_127',['mi_option_disable',['../group__options.html#gaebf6ff707a2e688ebb1a2296ca564054',1,'mimalloc-doc.h']]], + ['mi_5foption_5fdisallow_5farena_5falloc_128',['mi_option_disallow_arena_alloc',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caeae1696100e4057ffc4182730cc04e40',1,'mimalloc-doc.h']]], + ['mi_5foption_5fdisallow_5fos_5falloc_129',['mi_option_disallow_os_alloc',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cadcfb5a09580361b1be65901d2d812de6',1,'mimalloc-doc.h']]], + ['mi_5foption_5feager_5fcommit_130',['mi_option_eager_commit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca1e8de72c93da7ff22d91e1e27b52ac2b',1,'mimalloc-doc.h']]], + ['mi_5foption_5feager_5fcommit_5fdelay_131',['mi_option_eager_commit_delay',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca17a190c25be381142d87e0468c4c068c',1,'mimalloc-doc.h']]], + ['mi_5foption_5fenable_132',['mi_option_enable',['../group__options.html#ga04180ae41b0d601421dd62ced40ca050',1,'mimalloc-doc.h']]], + ['mi_5foption_5fgeneric_5fcollect_133',['mi_option_generic_collect',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca8b5815a577955fe8125f2b964f41ee7f',1,'mimalloc-doc.h']]], + ['mi_5foption_5fget_134',['mi_option_get',['../group__options.html#ga7e8af195cc81d3fa64ccf2662caa565a',1,'mimalloc-doc.h']]], + ['mi_5foption_5fget_5fclamp_135',['mi_option_get_clamp',['../group__options.html#ga96ad9c406338bd314cfe878cfc9bf723',1,'mimalloc-doc.h']]], + ['mi_5foption_5fget_5fsize_136',['mi_option_get_size',['../group__options.html#ga274db5a6ac87cc24ef0b23e7006ed02c',1,'mimalloc-doc.h']]], + ['mi_5foption_5fguarded_5fmax_137',['mi_option_guarded_max',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca96077da4e5c841edeec0c4d6e45a5ffa',1,'mimalloc-doc.h']]], + ['mi_5foption_5fguarded_5fmin_138',['mi_option_guarded_min',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca00734c528aae52784654a8db996ae62b',1,'mimalloc-doc.h']]], + ['mi_5foption_5fguarded_5fprecise_139',['mi_option_guarded_precise',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca1eaf89bb1698f988cec27b66e546760c',1,'mimalloc-doc.h']]], + ['mi_5foption_5fguarded_5fsample_5frate_140',['mi_option_guarded_sample_rate',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caeb3c75b1a838eb42106750979d0888ec',1,'mimalloc-doc.h']]], + ['mi_5foption_5fguarded_5fsample_5fseed_141',['mi_option_guarded_sample_seed',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca7b1e41ece69f9abbe5ba81d9ea7a3dc0',1,'mimalloc-doc.h']]], + ['mi_5foption_5fis_5fenabled_142',['mi_option_is_enabled',['../group__options.html#ga459ad98f18b3fc9275474807fe0ca188',1,'mimalloc-doc.h']]], + ['mi_5foption_5fmax_5ferrors_143',['mi_option_max_errors',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caec6ecbe29d46a48205ed8823a8a52a6a',1,'mimalloc-doc.h']]], + ['mi_5foption_5fmax_5fsegment_5freclaim_144',['mi_option_max_segment_reclaim',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caa9ad9005d7017c8c30ad2d6ba31db909',1,'mimalloc-doc.h']]], + ['mi_5foption_5fmax_5fvabits_145',['mi_option_max_vabits',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caabf8c9793d421ce28361b6d93c432de9',1,'mimalloc-doc.h']]], + ['mi_5foption_5fmax_5fwarnings_146',['mi_option_max_warnings',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caf9595921087e942602ee079158762665',1,'mimalloc-doc.h']]], + ['mi_5foption_5fminimal_5fpurge_5fsize_147',['mi_option_minimal_purge_size',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca5635112095936356425d9a01910afff7',1,'mimalloc-doc.h']]], + ['mi_5foption_5fos_5ftag_148',['mi_option_os_tag',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4b74ae2a69e445de6c2361b73c1d14bf',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpage_5fcommit_5fon_5fdemand_149',['mi_option_page_commit_on_demand',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca679d9ee91221bffba4d5aafe488a8d7f',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpage_5fcross_5fthread_5fmax_5freclaim_150',['mi_option_page_cross_thread_max_reclaim',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca671e806447c15a53c7d593afdd8d45c5',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpage_5ffull_5fretain_151',['mi_option_page_full_retain',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caeede7d0652e391940357e1c054d29829',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpage_5fmax_5fcandidates_152',['mi_option_page_max_candidates',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cad13382757101aa4fbc4984fa0f917133',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpage_5fmax_5freclaim_153',['mi_option_page_max_reclaim',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca11a13739488294318ffc03eea378f5a4',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpage_5freclaim_5fon_5ffree_154',['mi_option_page_reclaim_on_free',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cac16e3f838e861338fb2357b430f6974c',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpagemap_5fcommit_155',['mi_option_pagemap_commit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caa88f56e3bccce85542dc2b3297024236',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpurge_5fdecommits_156',['mi_option_purge_decommits',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca9d15c5e3d2115eef681c17e4dd5ab9a4',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpurge_5fdelay_157',['mi_option_purge_delay',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cadd351e615acd8563529c20a347be7290',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpurge_5fextend_5fdelay_158',['mi_option_purge_extend_delay',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca02005f164bdf03f5f00c5be726adf487',1,'mimalloc-doc.h']]], + ['mi_5foption_5freserve_5fhuge_5fos_5fpages_159',['mi_option_reserve_huge_os_pages',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caca7ed041be3b0b9d0b82432c7bf41af2',1,'mimalloc-doc.h']]], + ['mi_5foption_5freserve_5fhuge_5fos_5fpages_5fat_160',['mi_option_reserve_huge_os_pages_at',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caa13e7926d4339d2aa6fbf61d4473fd5c',1,'mimalloc-doc.h']]], + ['mi_5foption_5freserve_5fos_5fmemory_161',['mi_option_reserve_os_memory',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafbf4999c828cf79a0fb2de65d23f7333',1,'mimalloc-doc.h']]], + ['mi_5foption_5fretry_5fon_5foom_162',['mi_option_retry_on_oom',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca8f51df355bf6651db899e6085b54865e',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_163',['mi_option_set',['../group__options.html#gaf84921c32375e25754dc2ee6a911fa60',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fdefault_164',['mi_option_set_default',['../group__options.html#ga7ef623e440e6e5545cb08c94e71e4b90',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fenabled_165',['mi_option_set_enabled',['../group__options.html#ga9a13d05fcb77489cb06d4d017ebd8bed',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fenabled_5fdefault_166',['mi_option_set_enabled_default',['../group__options.html#ga65518b69ec5d32336b50e07f74b3f629',1,'mimalloc-doc.h']]], + ['mi_5foption_5fshow_5ferrors_167',['mi_option_show_errors',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafbf4822e5c00732c5984b32a032837f0',1,'mimalloc-doc.h']]], + ['mi_5foption_5fshow_5fstats_168',['mi_option_show_stats',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0957ef73b2550764b4840edf48422fda',1,'mimalloc-doc.h']]], + ['mi_5foption_5ft_169',['mi_option_t',['../group__options.html#gafebf7ed116adb38ae5218bc3ce06884c',1,'mimalloc-doc.h']]], + ['mi_5foption_5ftarget_5fsegments_5fper_5fthread_170',['mi_option_target_segments_per_thread',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca874f36a7a1e51f7baee4a78b2830b643',1,'mimalloc-doc.h']]], + ['mi_5foption_5fuse_5fnuma_5fnodes_171',['mi_option_use_numa_nodes',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0ac33a18f6b659fcfaf44efb0bab1b74',1,'mimalloc-doc.h']]], + ['mi_5foption_5fverbose_172',['mi_option_verbose',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca7c8b7bf5281c581bad64f5daa6442777',1,'mimalloc-doc.h']]], + ['mi_5foption_5fvisit_5fabandoned_173',['mi_option_visit_abandoned',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca38c67733a3956a1f4eeaca89fab9e78e',1,'mimalloc-doc.h']]], + ['mi_5foptions_5fprint_174',['mi_options_print',['../group__options.html#gaecfcd3ed90af99932670d881de1fa8f1',1,'mimalloc-doc.h']]], + ['mi_5foptions_5fprint_5fout_175',['mi_options_print_out',['../group__options.html#ga1dd50c7533baec4cc6c1a2e9adf05dd2',1,'mimalloc-doc.h']]], + ['mi_5foutput_5ffun_176',['mi_output_fun',['../group__extended.html#gadf31cea7d0332a81c8b882cbbdbadb8d',1,'mimalloc-doc.h']]], + ['mi_5fposix_5fmemalign_177',['mi_posix_memalign',['../group__posix.html#gacff84f226ba9feb2031b8992e5579447',1,'mimalloc-doc.h']]], + ['mi_5fprocess_5finfo_178',['mi_process_info',['../group__stats.html#ga7d862c2affd5790381da14eb102a364d',1,'mimalloc-doc.h']]], + ['mi_5fprocess_5finfo_5fprint_179',['mi_process_info_print',['../group__stats.html#gaf887e7aa75f13242c4e7ab95d8390536',1,'mimalloc-doc.h']]], + ['mi_5fprocess_5finfo_5fprint_5fout_180',['mi_process_info_print_out',['../group__stats.html#ga03ac88d3efee2ae7c34f5340502f4732',1,'mimalloc-doc.h']]], + ['mi_5fpvalloc_181',['mi_pvalloc',['../group__posix.html#ga644bebccdbb2821542dd8c7e7641f476',1,'mimalloc-doc.h']]], + ['mi_5frealloc_182',['mi_realloc',['../group__malloc.html#ga0621af6a5e3aa384e6a1b548958bf583',1,'mimalloc-doc.h']]], + ['mi_5frealloc_5faligned_183',['mi_realloc_aligned',['../group__aligned.html#ga5d7a46d054b4d7abe9d8d2474add2edf',1,'mimalloc-doc.h']]], + ['mi_5frealloc_5faligned_5fat_184',['mi_realloc_aligned_at',['../group__aligned.html#gad06dcf2bb8faadb2c8ea61ee5d24bbf6',1,'mimalloc-doc.h']]], + ['mi_5freallocarr_185',['mi_reallocarr',['../group__posix.html#ga7e1934d60a3e697950eeb48e042bfad5',1,'mimalloc-doc.h']]], + ['mi_5freallocarray_186',['mi_reallocarray',['../group__posix.html#gadfeccb72748a2f6305474a37d9d57bce',1,'mimalloc-doc.h']]], + ['mi_5freallocf_187',['mi_reallocf',['../group__malloc.html#ga4dc3a4067037b151a64629fe8a332641',1,'mimalloc-doc.h']]], + ['mi_5freallocn_188',['mi_reallocn',['../group__malloc.html#ga8bddfb4a1270a0854bbcf44cb3980467',1,'mimalloc-doc.h']]], + ['mi_5freallocn_5ftp_189',['mi_reallocn_tp',['../group__typed.html#ga1158b49a55dfa81f58a4426a7578f523',1,'mimalloc-doc.h']]], + ['mi_5frealpath_190',['mi_realpath',['../group__malloc.html#ga94c3afcc086e85d75a57e9f76b9b71dd',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_191',['mi_recalloc',['../group__zeroinit.html#ga23a0fbb452b5dce8e31fab1a1958cacc',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_5faligned_192',['mi_recalloc_aligned',['../group__zeroinit.html#ga3e2169b48683aa0ab64f813fd68d839e',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_5faligned_5fat_193',['mi_recalloc_aligned_at',['../group__zeroinit.html#gaae25e4ddedd4e0fb61b1a8bd5d452750',1,'mimalloc-doc.h']]], + ['mi_5fregister_5fdeferred_5ffree_194',['mi_register_deferred_free',['../group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece',1,'mimalloc-doc.h']]], + ['mi_5fregister_5ferror_195',['mi_register_error',['../group__extended.html#gaa1d55e0e894be240827e5d87ec3a1f45',1,'mimalloc-doc.h']]], + ['mi_5fregister_5foutput_196',['mi_register_output',['../group__extended.html#gae5b17ff027cd2150b43a33040250cf3f',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fhuge_5fos_5fpages_5fat_197',['mi_reserve_huge_os_pages_at',['../group__arenas.html#ga7795a13d20087447281858d2c771cca1',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fhuge_5fos_5fpages_5fat_5fex_198',['mi_reserve_huge_os_pages_at_ex',['../group__arenas.html#ga591aab1c2bc2ca920e33f0f9f9cb5c52',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fhuge_5fos_5fpages_5finterleave_199',['mi_reserve_huge_os_pages_interleave',['../group__arenas.html#ga3132f521fb756fc0e8ec0b74fb58df50',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fos_5fmemory_200',['mi_reserve_os_memory',['../group__arenas.html#ga00ec3324b6b2591c7fe3677baa30a767',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fos_5fmemory_5fex_201',['mi_reserve_os_memory_ex',['../group__arenas.html#ga32f519797fd9a81acb4f52d36e6d751b',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_202',['mi_rezalloc',['../group__zeroinit.html#gadfd34cd7b4f2bbda7ae06367a6360756',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_5faligned_203',['mi_rezalloc_aligned',['../group__zeroinit.html#ga4d02404fe1e7db00beb65f185e012caa',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_5faligned_5fat_204',['mi_rezalloc_aligned_at',['../group__zeroinit.html#ga6843a88285bbfcc3bdfccc60aafd1270',1,'mimalloc-doc.h']]], + ['mi_5fsmall_5fsize_5fmax_205',['MI_SMALL_SIZE_MAX',['../group__extended.html#ga1ea64283508718d9d645c38efc2f4305',1,'mimalloc-doc.h']]], + ['mi_5fstat_5fversion_206',['MI_STAT_VERSION',['../group__stats.html#gac4411cf3eed23719e511b9e1128888e0',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fas_5fjson_207',['mi_stats_as_json',['../group__stats.html#ga6ad266c70a0eabf6c26248aed1af6fa1',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fget_208',['mi_stats_get',['../group__stats.html#gaa26d5060ad21b1331a150bb92f6f7086',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fget_5fbin_5fsize_209',['mi_stats_get_bin_size',['../group__stats.html#gadecd549d1a7216af596322ac27e78b0d',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fget_5fjson_210',['mi_stats_get_json',['../group__stats.html#gadaa3be15899cc82e314fa7d3f8e2afbd',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fmerge_211',['mi_stats_merge',['../group__stats.html#ga854b1de8cb067c7316286c28b2fcd3d1',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fprint_212',['mi_stats_print',['../group__stats.html#ga2d126e5c62d3badc35445e5d84166df2',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fprint_5fout_213',['mi_stats_print_out',['../group__stats.html#ga537f13b299ddf801e49a5a94fde02c79',1,'mimalloc-doc.h']]], + ['mi_5fstats_5freset_214',['mi_stats_reset',['../group__stats.html#ga3bb8468b8cfcc6e2a61d98aee85c5f99',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fs_215',['mi_stats_s',['../group__stats.html#structmi__stats__s',1,'']]], + ['mi_5fstats_5ft_5fdecl_216',['mi_stats_t_decl',['../group__stats.html#ga961d0f9f0327ebc9bd8a0b84f6dcb410',1,'mimalloc-doc.h']]], + ['mi_5fstl_5fallocator_217',['mi_stl_allocator',['../group__cpp.html#structmi__stl__allocator',1,'']]], + ['mi_5fstrdup_218',['mi_strdup',['../group__malloc.html#ga245ac90ebc2cfdd17de599e5fea59889',1,'mimalloc-doc.h']]], + ['mi_5fstrndup_219',['mi_strndup',['../group__malloc.html#ga486d0d26b3b3794f6d1cdb41a9aed92d',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fadd_5fcurrent_5fthread_220',['mi_subproc_add_current_thread',['../group__subproc.html#gadbc53414eb68b275588ec001ce1ddc7c',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fcurrent_221',['mi_subproc_current',['../group__subproc.html#gaabc4db6585bf16099e43e60d64364950',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fdelete_222',['mi_subproc_delete',['../group__subproc.html#gaa7d263e9429bac9ac8345c9d25de610e',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fdestroy_223',['mi_subproc_destroy',['../group__subproc.html#gada12e4d9bd382935c398ec324d0391f9',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fheap_5fstats_5fprint_5fout_224',['mi_subproc_heap_stats_print_out',['../group__stats.html#ga19f1a04bd972e11e4f3b586f25229d5b',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fid_5ft_225',['mi_subproc_id_t',['../group__subproc.html#ga8c0bcd1fee27c7641e9c3c0d991b3b7d',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fmain_226',['mi_subproc_main',['../group__subproc.html#ga2ecba0d7ebdc99e71bb985c4a1609806',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fnew_227',['mi_subproc_new',['../group__subproc.html#ga8068cac328e41fa2170faef707315243',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fstats_5fget_228',['mi_subproc_stats_get',['../group__stats.html#ga5ec3f9058eec804924711ab38ba64b51',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fstats_5fget_5fjson_229',['mi_subproc_stats_get_json',['../group__stats.html#gad1cf918f08b6506e65ae134423477a0b',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fstats_5fprint_5fout_230',['mi_subproc_stats_print_out',['../group__stats.html#ga59ec89969837db414a6bce8b58915624',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fvisit_5fheaps_231',['mi_subproc_visit_heaps',['../group__subproc.html#gafd2136e7f167b5cd02b6ab00bed0ac93',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fcalloc_232',['mi_theap_calloc',['../group__theap.html#gadbf8f27bfe9edf7834e19d32cab63edc',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fcollect_233',['mi_theap_collect',['../group__theap.html#ga9377a43095b8dd14996613ceb73d9a32',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fget_5fdefault_234',['mi_theap_get_default',['../group__theap.html#ga78afbb07c1e0cd333c7539cf7403dfd5',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fmalloc_235',['mi_theap_malloc',['../group__theap.html#gac7308e029c59e6675dd5ab5ec54f304a',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fmalloc_5faligned_236',['mi_theap_malloc_aligned',['../group__theap.html#ga84503fc2bd83fbfb7f789b7d80d76f36',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fmalloc_5fcsize_237',['mi_theap_malloc_csize',['../group__constantsize.html#ga105bd667da91a15d113fe79be04d625c',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fmalloc_5fsmall_238',['mi_theap_malloc_small',['../group__theap.html#ga1fc65302a212daaecb21abda96ff247c',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5frealloc_239',['mi_theap_realloc',['../group__theap.html#ga11943128dc354313c4189e72f4299dbb',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fset_5fdefault_240',['mi_theap_set_default',['../group__theap.html#ga04420ce52785019412397e4de24a984a',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5ft_241',['mi_theap_t',['../group__theap.html#ga8722f6ac4f638b4692e06ddfddc844f8',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fzalloc_242',['mi_theap_zalloc',['../group__theap.html#gaa7fd973dcd8c75eb05707bdeffbc06f7',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fzalloc_5fcsize_243',['mi_theap_zalloc_csize',['../group__constantsize.html#ga1addf755829380581dd9c3c9175e376f',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fzalloc_5fsmall_244',['mi_theap_zalloc_small',['../group__theap.html#gaa85fccf9d40af3e826c5932aded1d534',1,'mimalloc-doc.h']]], + ['mi_5fthread_5fdone_245',['mi_thread_done',['../group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf',1,'mimalloc-doc.h']]], + ['mi_5fthread_5finit_246',['mi_thread_init',['../group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17',1,'mimalloc-doc.h']]], + ['mi_5fthread_5fset_5fin_5fthreadpool_247',['mi_thread_set_in_threadpool',['../group__extended.html#gada899104276aac52539eb4de7c020f1f',1,'mimalloc-doc.h']]], + ['mi_5fusable_5fsize_248',['mi_usable_size',['../group__malloc.html#ga089c859d9eddc5f9b4bd946cd53cebee',1,'mimalloc-doc.h']]], + ['mi_5fvalloc_249',['mi_valloc',['../group__posix.html#ga50cafb9722020402f065de93799f64ca',1,'mimalloc-doc.h']]], + ['mi_5fversion_250',['mi_version',['../group__extended.html#gae9ddddcf14a58d0224ef3c8778e5b057',1,'mimalloc-doc.h']]], + ['mi_5fwcsdup_251',['mi_wcsdup',['../group__posix.html#gaa9fd7f25c9ac3a20e89b33bd6e383fcf',1,'mimalloc-doc.h']]], + ['mi_5fwdupenv_5fs_252',['mi_wdupenv_s',['../group__posix.html#ga6ac6a6a8f3c96f1af24bb8d0439cbbd1',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_253',['mi_zalloc',['../group__malloc.html#gae6e38c4403247a7b40d80419e093bfb8',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5faligned_254',['mi_zalloc_aligned',['../group__aligned.html#gaac7d0beb782f9b9ac31f47492b130f82',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5faligned_5fat_255',['mi_zalloc_aligned_at',['../group__aligned.html#ga7c1778805ce50ebbf02ccbd5e39d5dba',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5fcsize_256',['mi_zalloc_csize',['../group__constantsize.html#gadca6d340ee15b5c70695ed82d95c6cec',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5fsmall_257',['mi_zalloc_small',['../group__extended.html#ga51c47637e81df0e2f13a2d7a2dec123e',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5ftp_258',['mi_zalloc_tp',['../group__typed.html#gac77a61bdaf680a803785fe307820b48c',1,'mimalloc-doc.h']]], + ['modes_259',['Build Modes',['../modes.html',1,'']]] ]; diff --git a/docs/search/functions_0.js b/docs/search/functions_0.js index d16b716ee..6d7a877dc 100644 --- a/docs/search/functions_0.js +++ b/docs/search/functions_0.js @@ -12,7 +12,7 @@ var searchData= ['mi_5fcalloc_9',['mi_calloc',['../group__malloc.html#ga6686568014b54d1e6c7ac64a076e4f56',1,'mimalloc-doc.h']]], ['mi_5fcalloc_5faligned_10',['mi_calloc_aligned',['../group__aligned.html#ga424ef386fb1f9f8e0a86ab53f16eaaf1',1,'mimalloc-doc.h']]], ['mi_5fcalloc_5faligned_5fat_11',['mi_calloc_aligned_at',['../group__aligned.html#ga977f96bd2c5c141bcd70e6685c90d6c3',1,'mimalloc-doc.h']]], - ['mi_5fcfree_12',['mi_cfree',['../group__posix.html#ga705dc7a64bffacfeeb0141501a5c35d7',1,'mimalloc-doc.h']]], + ['mi_5fcfree_12',['mi_cfree',['../group__malloc.html#ga705dc7a64bffacfeeb0141501a5c35d7',1,'mimalloc-doc.h']]], ['mi_5fcheck_5fowned_13',['mi_check_owned',['../group__heap.html#ga628c237489c2679af84a4d0d143b3dd5',1,'mimalloc-doc.h']]], ['mi_5fcollect_14',['mi_collect',['../group__extended.html#ga421430e2226d7d468529cec457396756',1,'mimalloc-doc.h']]], ['mi_5fdebug_5fshow_5farenas_15',['mi_debug_show_arenas',['../group__arenas.html#ga98cda17aa7adeda8b213382af8e7810b',1,'mimalloc-doc.h']]], @@ -21,162 +21,165 @@ var searchData= ['mi_5ffree_18',['mi_free',['../group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95',1,'mimalloc-doc.h']]], ['mi_5ffree_5faligned_19',['mi_free_aligned',['../group__posix.html#ga0d28d5cf61e6bfbb18c63092939fe5c9',1,'mimalloc-doc.h']]], ['mi_5ffree_5fcsize_20',['mi_free_csize',['../group__constantsize.html#ga7a421e302074e598527c3eb052a6a3c5',1,'mimalloc-doc.h']]], - ['mi_5ffree_5fsize_21',['mi_free_size',['../group__posix.html#gae01389eedab8d67341ff52e2aad80ebb',1,'mimalloc-doc.h']]], - ['mi_5ffree_5fsize_5faligned_22',['mi_free_size_aligned',['../group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc',1,'mimalloc-doc.h']]], - ['mi_5ffree_5fsmall_23',['mi_free_small',['../group__extended.html#ga2a8469764c38dcaf878f36e5f50e3610',1,'mimalloc-doc.h']]], - ['mi_5fgood_5fsize_24',['mi_good_size',['../group__malloc.html#gac057927cd06c854b45fe7847e921bd47',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcalloc_25',['mi_heap_calloc',['../group__heap.html#gac0098aaf231d3e9586c73136d5df95da',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcalloc_5faligned_26',['mi_heap_calloc_aligned',['../group__heap.html#gacafcc26df827c7a7de5e850217566108',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcalloc_5faligned_5fat_27',['mi_heap_calloc_aligned_at',['../group__heap.html#gaa42ec2079989c4374f2c331d9b35f4e4',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcheck_5fowned_28',['mi_heap_check_owned',['../group__heap.html#ga0d67c1789faaa15ff366c024fcaf6377',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcollect_29',['mi_heap_collect',['../group__heap.html#ga7922f7495cde30b1984d0e6072419298',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcontains_30',['mi_heap_contains',['../group__heap.html#gac988496aea8ffc5c8bf92a8b10165fa0',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fcontains_5fblock_31',['mi_heap_contains_block',['../group__heap.html#gaa862aa8ed8d57d84cae41fc1022d71af',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fdelete_32',['mi_heap_delete',['../group__heap.html#ga2ab1af8d438819b55319c7ef51d1e409',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fdestroy_33',['mi_heap_destroy',['../group__heap.html#ga9f9c0844edb9717f4feacd79116b8e0d',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fget_5fbacking_34',['mi_heap_get_backing',['../group__heap.html#gac6ac9f0e7be9ab4ff70acfc8dad1235a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fget_5fdefault_35',['mi_heap_get_default',['../group__heap.html#ga14c667a6e2c5d28762d8cb7d4e057909',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmain_36',['mi_heap_main',['../group__heap.html#ga8fc318a65dc79ee8778c6a0e52d12477',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmalloc_37',['mi_heap_malloc',['../group__heap.html#gab374e206c7034e0d899fb934e4f4a863',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmalloc_5faligned_38',['mi_heap_malloc_aligned',['../group__heap.html#ga33f4f05b7fea7af2113c62a4bf882cc5',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmalloc_5faligned_5fat_39',['mi_heap_malloc_aligned_at',['../group__heap.html#gae7ffc045c3996497a7f3a5f6fe7b8aaa',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmalloc_5fsmall_40',['mi_heap_malloc_small',['../group__heap.html#ga012c5c8abe22b10043de39ff95909541',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fmallocn_41',['mi_heap_mallocn',['../group__heap.html#gab0f755c0b21c387fe8e9024200faa372',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fnew_42',['mi_heap_new',['../group__heap.html#gaa718bb226ec0546ba6d1b6cb32179f3a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fnew_5fex_43',['mi_heap_new_ex',['../group__arenas.html#ga3ae360583f4351aa5267ee7e43008faf',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fnew_5fin_5farena_44',['mi_heap_new_in_arena',['../group__arenas.html#gaaf2d9976576d5efd5544be12848af949',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fof_45',['mi_heap_of',['../group__heap.html#ga424b69f285109b2515631d59f5eecb1b',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frealloc_46',['mi_heap_realloc',['../group__heap.html#gac5252d6a2e510bd349e4fcb452e6a93a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frealloc_5faligned_47',['mi_heap_realloc_aligned',['../group__heap.html#gaccf8c249872f30bf1c2493a09197d734',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frealloc_5faligned_5fat_48',['mi_heap_realloc_aligned_at',['../group__heap.html#ga6df988a7219d5707f010d5f3eb0dc3f5',1,'mimalloc-doc.h']]], - ['mi_5fheap_5freallocf_49',['mi_heap_reallocf',['../group__heap.html#gae7cd171425bee04c683c65a3701f0b4a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5freallocn_50',['mi_heap_reallocn',['../group__heap.html#gaccf7bfe10ce510a000d3547d9cf7fa29',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frealpath_51',['mi_heap_realpath',['../group__heap.html#ga55545a3ec6da29c5b4f62e540ecac1e2',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frecalloc_52',['mi_heap_recalloc',['../group__zeroinit.html#gad1a0d325d930eeb80f25e3fea37aacde',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frecalloc_5faligned_53',['mi_heap_recalloc_aligned',['../group__zeroinit.html#ga87ddd674bf1c67237d780d0b9e0f0f32',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frecalloc_5faligned_5fat_54',['mi_heap_recalloc_aligned_at',['../group__zeroinit.html#ga07b5bcbaf00d0d2e598c232982588496',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frezalloc_55',['mi_heap_rezalloc',['../group__zeroinit.html#ga8d8b7ebb24b513cd84d1a696048da60d',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frezalloc_5faligned_56',['mi_heap_rezalloc_aligned',['../group__zeroinit.html#ga5129f6dc46ee1613d918820a8a0533a7',1,'mimalloc-doc.h']]], - ['mi_5fheap_5frezalloc_5faligned_5fat_57',['mi_heap_rezalloc_aligned_at',['../group__zeroinit.html#ga2bafa79c3f98ea74882349d44cffa5d9',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fset_5fdefault_58',['mi_heap_set_default',['../group__heap.html#ga349b677dec7da5eacdbc7a385bd62a4a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fset_5fnuma_5faffinity_59',['mi_heap_set_numa_affinity',['../group__heap.html#gaab93abbc0624f570e2900f95cac18591',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstats_5fget_60',['mi_heap_stats_get',['../group__stats.html#ga2654195cef93ed3613e98b59a19a296f',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstats_5fget_5fjson_61',['mi_heap_stats_get_json',['../group__stats.html#gacb42dede4c38c38f2014b5450c5fcba8',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstats_5fmerge_5fto_5fsubproc_62',['mi_heap_stats_merge_to_subproc',['../group__stats.html#ga5a34328f846c661aa560f4769cfc15f1',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstats_5fprint_5fout_63',['mi_heap_stats_print_out',['../group__stats.html#gafea365d7842f5f5bc1f235bbc303d585',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstrdup_64',['mi_heap_strdup',['../group__heap.html#ga5754e09ccc51dd6bc73885bb6ea21b7a',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fstrndup_65',['mi_heap_strndup',['../group__heap.html#gad224df78f1fbee942df8adf023e12cf3',1,'mimalloc-doc.h']]], - ['mi_5fheap_5ftheap_66',['mi_heap_theap',['../group__theap.html#ga7905a73865733da8a43339a500533180',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fvisit_5fblocks_67',['mi_heap_visit_blocks',['../group__analysis.html#gae69fcff3324f8e419af850e34cf54c46',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fzalloc_68',['mi_heap_zalloc',['../group__heap.html#gabebc796399619d964d8db77aa835e8c1',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fzalloc_5faligned_69',['mi_heap_zalloc_aligned',['../group__heap.html#ga6466bde8b5712aa34e081a8317f9f471',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fzalloc_5faligned_5fat_70',['mi_heap_zalloc_aligned_at',['../group__heap.html#ga484e3d01cd174f78c7e53370e5a7c819',1,'mimalloc-doc.h']]], - ['mi_5fheap_5fzalloc_5fsmall_71',['mi_heap_zalloc_small',['../group__heap.html#ga0994f44cc595f9c1840a9af162d98597',1,'mimalloc-doc.h']]], - ['mi_5fis_5fin_5fheap_5fregion_72',['mi_is_in_heap_region',['../group__heap.html#ga5f071b10d4df1c3658e04e7fd67a94e6',1,'mimalloc-doc.h']]], - ['mi_5fis_5fredirected_73',['mi_is_redirected',['../group__extended.html#gaad25050b19f30cd79397b227e0157a3f',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_74',['mi_malloc',['../group__malloc.html#gae1dd97b542420c87ae085e822b1229e8',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5faligned_75',['mi_malloc_aligned',['../group__aligned.html#ga69578ff1a98ca16e1dcd02c0995cd65c',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5faligned_5fat_76',['mi_malloc_aligned_at',['../group__aligned.html#ga2022f71b95a7cd6cce1b6e07752ae8ca',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5fcsize_77',['mi_malloc_csize',['../group__constantsize.html#ga9cd44d925d34f7180922e12bbf594571',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5fgood_5fsize_78',['mi_malloc_good_size',['../group__posix.html#ga9d23ac7885fed7413c11d8e0ffa31071',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5fsize_79',['mi_malloc_size',['../group__posix.html#ga4531c9e775bb3ae12db57c1ba8a5d7de',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5fsmall_80',['mi_malloc_small',['../group__extended.html#ga7f050bc6b897da82692174f5fce59cde',1,'mimalloc-doc.h']]], - ['mi_5fmalloc_5fusable_5fsize_81',['mi_malloc_usable_size',['../group__posix.html#ga06d07cf357bbac5c73ba5d0c0c421e17',1,'mimalloc-doc.h']]], - ['mi_5fmallocn_82',['mi_mallocn',['../group__malloc.html#ga61f46bade3db76ca24aaafedc40de7b6',1,'mimalloc-doc.h']]], - ['mi_5fmanage_5fos_5fmemory_83',['mi_manage_os_memory',['../group__arenas.html#ga4c6486a1fdcd7a423b5f25fe4be8e0cf',1,'mimalloc-doc.h']]], - ['mi_5fmanage_5fos_5fmemory_5fex_84',['mi_manage_os_memory_ex',['../group__arenas.html#ga41ce8525d77bbb60f618fa1029994f6e',1,'mimalloc-doc.h']]], - ['mi_5fmbsdup_85',['mi_mbsdup',['../group__posix.html#ga7b82a44094fdec4d2084eb4288a979b0',1,'mimalloc-doc.h']]], - ['mi_5fmemalign_86',['mi_memalign',['../group__posix.html#ga726867f13fd29ca36064954c0285b1d8',1,'mimalloc-doc.h']]], - ['mi_5fnew_87',['mi_new',['../group__cpp.html#ga633d96e3bc7011f960df9f3b2731fc6a',1,'mimalloc-doc.h']]], - ['mi_5fnew_5faligned_88',['mi_new_aligned',['../group__cpp.html#ga79c54da0b4b4ce9fcc11d2f6ef6675f8',1,'mimalloc-doc.h']]], - ['mi_5fnew_5faligned_5fnothrow_89',['mi_new_aligned_nothrow',['../group__cpp.html#ga92ae00b6dd64406c7e64557711ec04b7',1,'mimalloc-doc.h']]], - ['mi_5fnew_5fn_90',['mi_new_n',['../group__cpp.html#gadd11b85c15d21d308386844b5233856c',1,'mimalloc-doc.h']]], - ['mi_5fnew_5fnothrow_91',['mi_new_nothrow',['../group__cpp.html#ga5cb4f120d1f7296074256215aa9a9e54',1,'mimalloc-doc.h']]], - ['mi_5fnew_5frealloc_92',['mi_new_realloc',['../group__cpp.html#ga6867d89baf992728e0cc20a1f47db4d0',1,'mimalloc-doc.h']]], - ['mi_5fnew_5freallocn_93',['mi_new_reallocn',['../group__cpp.html#gaace912ce086682d56f3ce9f7638d9d67',1,'mimalloc-doc.h']]], - ['mi_5foption_5fdisable_94',['mi_option_disable',['../group__options.html#gaebf6ff707a2e688ebb1a2296ca564054',1,'mimalloc-doc.h']]], - ['mi_5foption_5fenable_95',['mi_option_enable',['../group__options.html#ga04180ae41b0d601421dd62ced40ca050',1,'mimalloc-doc.h']]], - ['mi_5foption_5fget_96',['mi_option_get',['../group__options.html#ga7e8af195cc81d3fa64ccf2662caa565a',1,'mimalloc-doc.h']]], - ['mi_5foption_5fget_5fclamp_97',['mi_option_get_clamp',['../group__options.html#ga96ad9c406338bd314cfe878cfc9bf723',1,'mimalloc-doc.h']]], - ['mi_5foption_5fget_5fsize_98',['mi_option_get_size',['../group__options.html#ga274db5a6ac87cc24ef0b23e7006ed02c',1,'mimalloc-doc.h']]], - ['mi_5foption_5fis_5fenabled_99',['mi_option_is_enabled',['../group__options.html#ga459ad98f18b3fc9275474807fe0ca188',1,'mimalloc-doc.h']]], - ['mi_5foption_5fset_100',['mi_option_set',['../group__options.html#gaf84921c32375e25754dc2ee6a911fa60',1,'mimalloc-doc.h']]], - ['mi_5foption_5fset_5fdefault_101',['mi_option_set_default',['../group__options.html#ga7ef623e440e6e5545cb08c94e71e4b90',1,'mimalloc-doc.h']]], - ['mi_5foption_5fset_5fenabled_102',['mi_option_set_enabled',['../group__options.html#ga9a13d05fcb77489cb06d4d017ebd8bed',1,'mimalloc-doc.h']]], - ['mi_5foption_5fset_5fenabled_5fdefault_103',['mi_option_set_enabled_default',['../group__options.html#ga65518b69ec5d32336b50e07f74b3f629',1,'mimalloc-doc.h']]], - ['mi_5foptions_5fprint_104',['mi_options_print',['../group__options.html#gaecfcd3ed90af99932670d881de1fa8f1',1,'mimalloc-doc.h']]], - ['mi_5foptions_5fprint_5fout_105',['mi_options_print_out',['../group__options.html#ga1dd50c7533baec4cc6c1a2e9adf05dd2',1,'mimalloc-doc.h']]], - ['mi_5fposix_5fmemalign_106',['mi_posix_memalign',['../group__posix.html#gacff84f226ba9feb2031b8992e5579447',1,'mimalloc-doc.h']]], - ['mi_5fprocess_5finfo_107',['mi_process_info',['../group__stats.html#ga7d862c2affd5790381da14eb102a364d',1,'mimalloc-doc.h']]], - ['mi_5fprocess_5finfo_5fprint_108',['mi_process_info_print',['../group__stats.html#gaf887e7aa75f13242c4e7ab95d8390536',1,'mimalloc-doc.h']]], - ['mi_5fprocess_5finfo_5fprint_5fout_109',['mi_process_info_print_out',['../group__stats.html#ga03ac88d3efee2ae7c34f5340502f4732',1,'mimalloc-doc.h']]], - ['mi_5fpvalloc_110',['mi_pvalloc',['../group__posix.html#ga644bebccdbb2821542dd8c7e7641f476',1,'mimalloc-doc.h']]], - ['mi_5frealloc_111',['mi_realloc',['../group__malloc.html#ga0621af6a5e3aa384e6a1b548958bf583',1,'mimalloc-doc.h']]], - ['mi_5frealloc_5faligned_112',['mi_realloc_aligned',['../group__aligned.html#ga5d7a46d054b4d7abe9d8d2474add2edf',1,'mimalloc-doc.h']]], - ['mi_5frealloc_5faligned_5fat_113',['mi_realloc_aligned_at',['../group__aligned.html#gad06dcf2bb8faadb2c8ea61ee5d24bbf6',1,'mimalloc-doc.h']]], - ['mi_5freallocarr_114',['mi_reallocarr',['../group__posix.html#ga7e1934d60a3e697950eeb48e042bfad5',1,'mimalloc-doc.h']]], - ['mi_5freallocarray_115',['mi_reallocarray',['../group__posix.html#gadfeccb72748a2f6305474a37d9d57bce',1,'mimalloc-doc.h']]], - ['mi_5freallocf_116',['mi_reallocf',['../group__malloc.html#ga4dc3a4067037b151a64629fe8a332641',1,'mimalloc-doc.h']]], - ['mi_5freallocn_117',['mi_reallocn',['../group__malloc.html#ga8bddfb4a1270a0854bbcf44cb3980467',1,'mimalloc-doc.h']]], - ['mi_5frealpath_118',['mi_realpath',['../group__malloc.html#ga94c3afcc086e85d75a57e9f76b9b71dd',1,'mimalloc-doc.h']]], - ['mi_5frecalloc_119',['mi_recalloc',['../group__zeroinit.html#ga23a0fbb452b5dce8e31fab1a1958cacc',1,'mimalloc-doc.h']]], - ['mi_5frecalloc_5faligned_120',['mi_recalloc_aligned',['../group__zeroinit.html#ga3e2169b48683aa0ab64f813fd68d839e',1,'mimalloc-doc.h']]], - ['mi_5frecalloc_5faligned_5fat_121',['mi_recalloc_aligned_at',['../group__zeroinit.html#gaae25e4ddedd4e0fb61b1a8bd5d452750',1,'mimalloc-doc.h']]], - ['mi_5fregister_5fdeferred_5ffree_122',['mi_register_deferred_free',['../group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece',1,'mimalloc-doc.h']]], - ['mi_5fregister_5ferror_123',['mi_register_error',['../group__extended.html#gaa1d55e0e894be240827e5d87ec3a1f45',1,'mimalloc-doc.h']]], - ['mi_5fregister_5foutput_124',['mi_register_output',['../group__extended.html#gae5b17ff027cd2150b43a33040250cf3f',1,'mimalloc-doc.h']]], - ['mi_5freserve_5fhuge_5fos_5fpages_5fat_125',['mi_reserve_huge_os_pages_at',['../group__arenas.html#ga7795a13d20087447281858d2c771cca1',1,'mimalloc-doc.h']]], - ['mi_5freserve_5fhuge_5fos_5fpages_5fat_5fex_126',['mi_reserve_huge_os_pages_at_ex',['../group__arenas.html#ga591aab1c2bc2ca920e33f0f9f9cb5c52',1,'mimalloc-doc.h']]], - ['mi_5freserve_5fhuge_5fos_5fpages_5finterleave_127',['mi_reserve_huge_os_pages_interleave',['../group__arenas.html#ga3132f521fb756fc0e8ec0b74fb58df50',1,'mimalloc-doc.h']]], - ['mi_5freserve_5fos_5fmemory_128',['mi_reserve_os_memory',['../group__arenas.html#ga00ec3324b6b2591c7fe3677baa30a767',1,'mimalloc-doc.h']]], - ['mi_5freserve_5fos_5fmemory_5fex_129',['mi_reserve_os_memory_ex',['../group__arenas.html#ga32f519797fd9a81acb4f52d36e6d751b',1,'mimalloc-doc.h']]], - ['mi_5frezalloc_130',['mi_rezalloc',['../group__zeroinit.html#gadfd34cd7b4f2bbda7ae06367a6360756',1,'mimalloc-doc.h']]], - ['mi_5frezalloc_5faligned_131',['mi_rezalloc_aligned',['../group__zeroinit.html#ga4d02404fe1e7db00beb65f185e012caa',1,'mimalloc-doc.h']]], - ['mi_5frezalloc_5faligned_5fat_132',['mi_rezalloc_aligned_at',['../group__zeroinit.html#ga6843a88285bbfcc3bdfccc60aafd1270',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fas_5fjson_133',['mi_stats_as_json',['../group__stats.html#ga6ad266c70a0eabf6c26248aed1af6fa1',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fget_134',['mi_stats_get',['../group__stats.html#gaa26d5060ad21b1331a150bb92f6f7086',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fget_5fbin_5fsize_135',['mi_stats_get_bin_size',['../group__stats.html#gadecd549d1a7216af596322ac27e78b0d',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fget_5fjson_136',['mi_stats_get_json',['../group__stats.html#gadaa3be15899cc82e314fa7d3f8e2afbd',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fmerge_137',['mi_stats_merge',['../group__stats.html#ga854b1de8cb067c7316286c28b2fcd3d1',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fprint_138',['mi_stats_print',['../group__stats.html#ga2d126e5c62d3badc35445e5d84166df2',1,'mimalloc-doc.h']]], - ['mi_5fstats_5fprint_5fout_139',['mi_stats_print_out',['../group__stats.html#ga537f13b299ddf801e49a5a94fde02c79',1,'mimalloc-doc.h']]], - ['mi_5fstats_5freset_140',['mi_stats_reset',['../group__stats.html#ga3bb8468b8cfcc6e2a61d98aee85c5f99',1,'mimalloc-doc.h']]], - ['mi_5fstrdup_141',['mi_strdup',['../group__malloc.html#ga245ac90ebc2cfdd17de599e5fea59889',1,'mimalloc-doc.h']]], - ['mi_5fstrndup_142',['mi_strndup',['../group__malloc.html#ga486d0d26b3b3794f6d1cdb41a9aed92d',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fadd_5fcurrent_5fthread_143',['mi_subproc_add_current_thread',['../group__subproc.html#gadbc53414eb68b275588ec001ce1ddc7c',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fcurrent_144',['mi_subproc_current',['../group__subproc.html#gaabc4db6585bf16099e43e60d64364950',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fdelete_145',['mi_subproc_delete',['../group__subproc.html#gaa7d263e9429bac9ac8345c9d25de610e',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fdestroy_146',['mi_subproc_destroy',['../group__subproc.html#gada12e4d9bd382935c398ec324d0391f9',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fheap_5fstats_5fprint_5fout_147',['mi_subproc_heap_stats_print_out',['../group__stats.html#ga19f1a04bd972e11e4f3b586f25229d5b',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fmain_148',['mi_subproc_main',['../group__subproc.html#ga2ecba0d7ebdc99e71bb985c4a1609806',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fnew_149',['mi_subproc_new',['../group__subproc.html#ga8068cac328e41fa2170faef707315243',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fstats_5fget_150',['mi_subproc_stats_get',['../group__stats.html#ga5ec3f9058eec804924711ab38ba64b51',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fstats_5fget_5fjson_151',['mi_subproc_stats_get_json',['../group__stats.html#gad1cf918f08b6506e65ae134423477a0b',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fstats_5fprint_5fout_152',['mi_subproc_stats_print_out',['../group__stats.html#ga59ec89969837db414a6bce8b58915624',1,'mimalloc-doc.h']]], - ['mi_5fsubproc_5fvisit_5fheaps_153',['mi_subproc_visit_heaps',['../group__subproc.html#gafd2136e7f167b5cd02b6ab00bed0ac93',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fcalloc_154',['mi_theap_calloc',['../group__theap.html#gadbf8f27bfe9edf7834e19d32cab63edc',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fcollect_155',['mi_theap_collect',['../group__theap.html#ga9377a43095b8dd14996613ceb73d9a32',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fget_5fdefault_156',['mi_theap_get_default',['../group__theap.html#ga78afbb07c1e0cd333c7539cf7403dfd5',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fmalloc_157',['mi_theap_malloc',['../group__theap.html#gac7308e029c59e6675dd5ab5ec54f304a',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fmalloc_5faligned_158',['mi_theap_malloc_aligned',['../group__theap.html#ga84503fc2bd83fbfb7f789b7d80d76f36',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fmalloc_5fcsize_159',['mi_theap_malloc_csize',['../group__constantsize.html#ga105bd667da91a15d113fe79be04d625c',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fmalloc_5fsmall_160',['mi_theap_malloc_small',['../group__theap.html#ga1fc65302a212daaecb21abda96ff247c',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5frealloc_161',['mi_theap_realloc',['../group__theap.html#ga11943128dc354313c4189e72f4299dbb',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fset_5fdefault_162',['mi_theap_set_default',['../group__theap.html#ga04420ce52785019412397e4de24a984a',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fzalloc_163',['mi_theap_zalloc',['../group__theap.html#gaa7fd973dcd8c75eb05707bdeffbc06f7',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fzalloc_5fcsize_164',['mi_theap_zalloc_csize',['../group__constantsize.html#ga1addf755829380581dd9c3c9175e376f',1,'mimalloc-doc.h']]], - ['mi_5ftheap_5fzalloc_5fsmall_165',['mi_theap_zalloc_small',['../group__theap.html#gaa85fccf9d40af3e826c5932aded1d534',1,'mimalloc-doc.h']]], - ['mi_5fthread_5fdone_166',['mi_thread_done',['../group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf',1,'mimalloc-doc.h']]], - ['mi_5fthread_5finit_167',['mi_thread_init',['../group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17',1,'mimalloc-doc.h']]], - ['mi_5fthread_5fset_5fin_5fthreadpool_168',['mi_thread_set_in_threadpool',['../group__extended.html#gada899104276aac52539eb4de7c020f1f',1,'mimalloc-doc.h']]], - ['mi_5fusable_5fsize_169',['mi_usable_size',['../group__malloc.html#ga089c859d9eddc5f9b4bd946cd53cebee',1,'mimalloc-doc.h']]], - ['mi_5fvalloc_170',['mi_valloc',['../group__posix.html#ga50cafb9722020402f065de93799f64ca',1,'mimalloc-doc.h']]], - ['mi_5fversion_171',['mi_version',['../group__extended.html#gae9ddddcf14a58d0224ef3c8778e5b057',1,'mimalloc-doc.h']]], - ['mi_5fwcsdup_172',['mi_wcsdup',['../group__posix.html#gaa9fd7f25c9ac3a20e89b33bd6e383fcf',1,'mimalloc-doc.h']]], - ['mi_5fwdupenv_5fs_173',['mi_wdupenv_s',['../group__posix.html#ga6ac6a6a8f3c96f1af24bb8d0439cbbd1',1,'mimalloc-doc.h']]], - ['mi_5fzalloc_174',['mi_zalloc',['../group__malloc.html#gae6e38c4403247a7b40d80419e093bfb8',1,'mimalloc-doc.h']]], - ['mi_5fzalloc_5faligned_175',['mi_zalloc_aligned',['../group__aligned.html#gaac7d0beb782f9b9ac31f47492b130f82',1,'mimalloc-doc.h']]], - ['mi_5fzalloc_5faligned_5fat_176',['mi_zalloc_aligned_at',['../group__aligned.html#ga7c1778805ce50ebbf02ccbd5e39d5dba',1,'mimalloc-doc.h']]], - ['mi_5fzalloc_5fcsize_177',['mi_zalloc_csize',['../group__constantsize.html#gadca6d340ee15b5c70695ed82d95c6cec',1,'mimalloc-doc.h']]], - ['mi_5fzalloc_5fsmall_178',['mi_zalloc_small',['../group__extended.html#ga51c47637e81df0e2f13a2d7a2dec123e',1,'mimalloc-doc.h']]] + ['mi_5ffree_5fcsize_5fnonnull_21',['mi_free_csize_nonnull',['../group__constantsize.html#ga38a93d373a9dc8edc8bca83edb6af5c5',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsize_22',['mi_free_size',['../group__posix.html#gae01389eedab8d67341ff52e2aad80ebb',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsize_5faligned_23',['mi_free_size_aligned',['../group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsize_5fnonnull_24',['mi_free_size_nonnull',['../group__posix.html#ga796602dae2a89797026f72e0c0240f32',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsmall_25',['mi_free_small',['../group__extended.html#ga2a8469764c38dcaf878f36e5f50e3610',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsmall_5fnonnull_26',['mi_free_small_nonnull',['../group__extended.html#ga22890f54e5be433837069c8e97fdf379',1,'mimalloc-doc.h']]], + ['mi_5fgood_5fsize_27',['mi_good_size',['../group__malloc.html#gac057927cd06c854b45fe7847e921bd47',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_28',['mi_heap_calloc',['../group__heap.html#gac0098aaf231d3e9586c73136d5df95da',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_5faligned_29',['mi_heap_calloc_aligned',['../group__heap.html#gacafcc26df827c7a7de5e850217566108',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_5faligned_5fat_30',['mi_heap_calloc_aligned_at',['../group__heap.html#gaa42ec2079989c4374f2c331d9b35f4e4',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcheck_5fowned_31',['mi_heap_check_owned',['../group__heap.html#ga0d67c1789faaa15ff366c024fcaf6377',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcollect_32',['mi_heap_collect',['../group__heap.html#ga7922f7495cde30b1984d0e6072419298',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcontains_33',['mi_heap_contains',['../group__heap.html#gac988496aea8ffc5c8bf92a8b10165fa0',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcontains_5fblock_34',['mi_heap_contains_block',['../group__heap.html#gaa862aa8ed8d57d84cae41fc1022d71af',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fdelete_35',['mi_heap_delete',['../group__heap.html#ga2ab1af8d438819b55319c7ef51d1e409',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fdestroy_36',['mi_heap_destroy',['../group__heap.html#ga9f9c0844edb9717f4feacd79116b8e0d',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fget_5fbacking_37',['mi_heap_get_backing',['../group__heap.html#gac6ac9f0e7be9ab4ff70acfc8dad1235a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fget_5fdefault_38',['mi_heap_get_default',['../group__heap.html#ga14c667a6e2c5d28762d8cb7d4e057909',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmain_39',['mi_heap_main',['../group__heap.html#ga8fc318a65dc79ee8778c6a0e52d12477',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_40',['mi_heap_malloc',['../group__heap.html#gab374e206c7034e0d899fb934e4f4a863',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5faligned_41',['mi_heap_malloc_aligned',['../group__heap.html#ga33f4f05b7fea7af2113c62a4bf882cc5',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5faligned_5fat_42',['mi_heap_malloc_aligned_at',['../group__heap.html#gae7ffc045c3996497a7f3a5f6fe7b8aaa',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5fsmall_43',['mi_heap_malloc_small',['../group__heap.html#ga012c5c8abe22b10043de39ff95909541',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmallocn_44',['mi_heap_mallocn',['../group__heap.html#gab0f755c0b21c387fe8e9024200faa372',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fnew_45',['mi_heap_new',['../group__heap.html#gaa718bb226ec0546ba6d1b6cb32179f3a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fnew_5fex_46',['mi_heap_new_ex',['../group__arenas.html#ga3ae360583f4351aa5267ee7e43008faf',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fnew_5fin_5farena_47',['mi_heap_new_in_arena',['../group__arenas.html#gaaf2d9976576d5efd5544be12848af949',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fof_48',['mi_heap_of',['../group__heap.html#ga424b69f285109b2515631d59f5eecb1b',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_49',['mi_heap_realloc',['../group__heap.html#gac5252d6a2e510bd349e4fcb452e6a93a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_5faligned_50',['mi_heap_realloc_aligned',['../group__heap.html#gaccf8c249872f30bf1c2493a09197d734',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_5faligned_5fat_51',['mi_heap_realloc_aligned_at',['../group__heap.html#ga6df988a7219d5707f010d5f3eb0dc3f5',1,'mimalloc-doc.h']]], + ['mi_5fheap_5freallocf_52',['mi_heap_reallocf',['../group__heap.html#gae7cd171425bee04c683c65a3701f0b4a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5freallocn_53',['mi_heap_reallocn',['../group__heap.html#gaccf7bfe10ce510a000d3547d9cf7fa29',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealpath_54',['mi_heap_realpath',['../group__heap.html#ga55545a3ec6da29c5b4f62e540ecac1e2',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_55',['mi_heap_recalloc',['../group__zeroinit.html#gad1a0d325d930eeb80f25e3fea37aacde',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_5faligned_56',['mi_heap_recalloc_aligned',['../group__zeroinit.html#ga87ddd674bf1c67237d780d0b9e0f0f32',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_5faligned_5fat_57',['mi_heap_recalloc_aligned_at',['../group__zeroinit.html#ga07b5bcbaf00d0d2e598c232982588496',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_58',['mi_heap_rezalloc',['../group__zeroinit.html#ga8d8b7ebb24b513cd84d1a696048da60d',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_5faligned_59',['mi_heap_rezalloc_aligned',['../group__zeroinit.html#ga5129f6dc46ee1613d918820a8a0533a7',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_5faligned_5fat_60',['mi_heap_rezalloc_aligned_at',['../group__zeroinit.html#ga2bafa79c3f98ea74882349d44cffa5d9',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fset_5fdefault_61',['mi_heap_set_default',['../group__heap.html#ga349b677dec7da5eacdbc7a385bd62a4a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fset_5fnuma_5faffinity_62',['mi_heap_set_numa_affinity',['../group__heap.html#gaab93abbc0624f570e2900f95cac18591',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstats_5fget_63',['mi_heap_stats_get',['../group__stats.html#ga2654195cef93ed3613e98b59a19a296f',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstats_5fget_5fjson_64',['mi_heap_stats_get_json',['../group__stats.html#gacb42dede4c38c38f2014b5450c5fcba8',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstats_5fmerge_5fto_5fsubproc_65',['mi_heap_stats_merge_to_subproc',['../group__stats.html#ga5a34328f846c661aa560f4769cfc15f1',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstats_5fprint_5fout_66',['mi_heap_stats_print_out',['../group__stats.html#gafea365d7842f5f5bc1f235bbc303d585',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstrdup_67',['mi_heap_strdup',['../group__heap.html#ga5754e09ccc51dd6bc73885bb6ea21b7a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstrndup_68',['mi_heap_strndup',['../group__heap.html#gad224df78f1fbee942df8adf023e12cf3',1,'mimalloc-doc.h']]], + ['mi_5fheap_5ftheap_69',['mi_heap_theap',['../group__theap.html#ga7905a73865733da8a43339a500533180',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fvisit_5fblocks_70',['mi_heap_visit_blocks',['../group__analysis.html#gae69fcff3324f8e419af850e34cf54c46',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_71',['mi_heap_zalloc',['../group__heap.html#gabebc796399619d964d8db77aa835e8c1',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5faligned_72',['mi_heap_zalloc_aligned',['../group__heap.html#ga6466bde8b5712aa34e081a8317f9f471',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5faligned_5fat_73',['mi_heap_zalloc_aligned_at',['../group__heap.html#ga484e3d01cd174f78c7e53370e5a7c819',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5fsmall_74',['mi_heap_zalloc_small',['../group__heap.html#ga0994f44cc595f9c1840a9af162d98597',1,'mimalloc-doc.h']]], + ['mi_5fis_5fin_5fheap_5fregion_75',['mi_is_in_heap_region',['../group__heap.html#ga5f071b10d4df1c3658e04e7fd67a94e6',1,'mimalloc-doc.h']]], + ['mi_5fis_5fredirected_76',['mi_is_redirected',['../group__extended.html#gaad25050b19f30cd79397b227e0157a3f',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_77',['mi_malloc',['../group__malloc.html#gae1dd97b542420c87ae085e822b1229e8',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5faligned_78',['mi_malloc_aligned',['../group__aligned.html#ga69578ff1a98ca16e1dcd02c0995cd65c',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5faligned_5fat_79',['mi_malloc_aligned_at',['../group__aligned.html#ga2022f71b95a7cd6cce1b6e07752ae8ca',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fcsize_80',['mi_malloc_csize',['../group__constantsize.html#ga9cd44d925d34f7180922e12bbf594571',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fgood_5fsize_81',['mi_malloc_good_size',['../group__posix.html#ga9d23ac7885fed7413c11d8e0ffa31071',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fsize_82',['mi_malloc_size',['../group__posix.html#ga4531c9e775bb3ae12db57c1ba8a5d7de',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fsmall_83',['mi_malloc_small',['../group__extended.html#ga7f050bc6b897da82692174f5fce59cde',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fusable_5fsize_84',['mi_malloc_usable_size',['../group__posix.html#ga06d07cf357bbac5c73ba5d0c0c421e17',1,'mimalloc-doc.h']]], + ['mi_5fmallocn_85',['mi_mallocn',['../group__malloc.html#ga61f46bade3db76ca24aaafedc40de7b6',1,'mimalloc-doc.h']]], + ['mi_5fmanage_5fos_5fmemory_86',['mi_manage_os_memory',['../group__arenas.html#ga4c6486a1fdcd7a423b5f25fe4be8e0cf',1,'mimalloc-doc.h']]], + ['mi_5fmanage_5fos_5fmemory_5fex_87',['mi_manage_os_memory_ex',['../group__arenas.html#ga41ce8525d77bbb60f618fa1029994f6e',1,'mimalloc-doc.h']]], + ['mi_5fmbsdup_88',['mi_mbsdup',['../group__posix.html#ga7b82a44094fdec4d2084eb4288a979b0',1,'mimalloc-doc.h']]], + ['mi_5fmemalign_89',['mi_memalign',['../group__posix.html#ga726867f13fd29ca36064954c0285b1d8',1,'mimalloc-doc.h']]], + ['mi_5fnew_90',['mi_new',['../group__cpp.html#ga633d96e3bc7011f960df9f3b2731fc6a',1,'mimalloc-doc.h']]], + ['mi_5fnew_5faligned_91',['mi_new_aligned',['../group__cpp.html#ga79c54da0b4b4ce9fcc11d2f6ef6675f8',1,'mimalloc-doc.h']]], + ['mi_5fnew_5faligned_5fnothrow_92',['mi_new_aligned_nothrow',['../group__cpp.html#ga92ae00b6dd64406c7e64557711ec04b7',1,'mimalloc-doc.h']]], + ['mi_5fnew_5fn_93',['mi_new_n',['../group__cpp.html#gadd11b85c15d21d308386844b5233856c',1,'mimalloc-doc.h']]], + ['mi_5fnew_5fnothrow_94',['mi_new_nothrow',['../group__cpp.html#ga5cb4f120d1f7296074256215aa9a9e54',1,'mimalloc-doc.h']]], + ['mi_5fnew_5frealloc_95',['mi_new_realloc',['../group__cpp.html#ga6867d89baf992728e0cc20a1f47db4d0',1,'mimalloc-doc.h']]], + ['mi_5fnew_5freallocn_96',['mi_new_reallocn',['../group__cpp.html#gaace912ce086682d56f3ce9f7638d9d67',1,'mimalloc-doc.h']]], + ['mi_5foption_5fdisable_97',['mi_option_disable',['../group__options.html#gaebf6ff707a2e688ebb1a2296ca564054',1,'mimalloc-doc.h']]], + ['mi_5foption_5fenable_98',['mi_option_enable',['../group__options.html#ga04180ae41b0d601421dd62ced40ca050',1,'mimalloc-doc.h']]], + ['mi_5foption_5fget_99',['mi_option_get',['../group__options.html#ga7e8af195cc81d3fa64ccf2662caa565a',1,'mimalloc-doc.h']]], + ['mi_5foption_5fget_5fclamp_100',['mi_option_get_clamp',['../group__options.html#ga96ad9c406338bd314cfe878cfc9bf723',1,'mimalloc-doc.h']]], + ['mi_5foption_5fget_5fsize_101',['mi_option_get_size',['../group__options.html#ga274db5a6ac87cc24ef0b23e7006ed02c',1,'mimalloc-doc.h']]], + ['mi_5foption_5fis_5fenabled_102',['mi_option_is_enabled',['../group__options.html#ga459ad98f18b3fc9275474807fe0ca188',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_103',['mi_option_set',['../group__options.html#gaf84921c32375e25754dc2ee6a911fa60',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fdefault_104',['mi_option_set_default',['../group__options.html#ga7ef623e440e6e5545cb08c94e71e4b90',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fenabled_105',['mi_option_set_enabled',['../group__options.html#ga9a13d05fcb77489cb06d4d017ebd8bed',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fenabled_5fdefault_106',['mi_option_set_enabled_default',['../group__options.html#ga65518b69ec5d32336b50e07f74b3f629',1,'mimalloc-doc.h']]], + ['mi_5foptions_5fprint_107',['mi_options_print',['../group__options.html#gaecfcd3ed90af99932670d881de1fa8f1',1,'mimalloc-doc.h']]], + ['mi_5foptions_5fprint_5fout_108',['mi_options_print_out',['../group__options.html#ga1dd50c7533baec4cc6c1a2e9adf05dd2',1,'mimalloc-doc.h']]], + ['mi_5fposix_5fmemalign_109',['mi_posix_memalign',['../group__posix.html#gacff84f226ba9feb2031b8992e5579447',1,'mimalloc-doc.h']]], + ['mi_5fprocess_5finfo_110',['mi_process_info',['../group__stats.html#ga7d862c2affd5790381da14eb102a364d',1,'mimalloc-doc.h']]], + ['mi_5fprocess_5finfo_5fprint_111',['mi_process_info_print',['../group__stats.html#gaf887e7aa75f13242c4e7ab95d8390536',1,'mimalloc-doc.h']]], + ['mi_5fprocess_5finfo_5fprint_5fout_112',['mi_process_info_print_out',['../group__stats.html#ga03ac88d3efee2ae7c34f5340502f4732',1,'mimalloc-doc.h']]], + ['mi_5fpvalloc_113',['mi_pvalloc',['../group__posix.html#ga644bebccdbb2821542dd8c7e7641f476',1,'mimalloc-doc.h']]], + ['mi_5frealloc_114',['mi_realloc',['../group__malloc.html#ga0621af6a5e3aa384e6a1b548958bf583',1,'mimalloc-doc.h']]], + ['mi_5frealloc_5faligned_115',['mi_realloc_aligned',['../group__aligned.html#ga5d7a46d054b4d7abe9d8d2474add2edf',1,'mimalloc-doc.h']]], + ['mi_5frealloc_5faligned_5fat_116',['mi_realloc_aligned_at',['../group__aligned.html#gad06dcf2bb8faadb2c8ea61ee5d24bbf6',1,'mimalloc-doc.h']]], + ['mi_5freallocarr_117',['mi_reallocarr',['../group__posix.html#ga7e1934d60a3e697950eeb48e042bfad5',1,'mimalloc-doc.h']]], + ['mi_5freallocarray_118',['mi_reallocarray',['../group__posix.html#gadfeccb72748a2f6305474a37d9d57bce',1,'mimalloc-doc.h']]], + ['mi_5freallocf_119',['mi_reallocf',['../group__malloc.html#ga4dc3a4067037b151a64629fe8a332641',1,'mimalloc-doc.h']]], + ['mi_5freallocn_120',['mi_reallocn',['../group__malloc.html#ga8bddfb4a1270a0854bbcf44cb3980467',1,'mimalloc-doc.h']]], + ['mi_5frealpath_121',['mi_realpath',['../group__malloc.html#ga94c3afcc086e85d75a57e9f76b9b71dd',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_122',['mi_recalloc',['../group__zeroinit.html#ga23a0fbb452b5dce8e31fab1a1958cacc',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_5faligned_123',['mi_recalloc_aligned',['../group__zeroinit.html#ga3e2169b48683aa0ab64f813fd68d839e',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_5faligned_5fat_124',['mi_recalloc_aligned_at',['../group__zeroinit.html#gaae25e4ddedd4e0fb61b1a8bd5d452750',1,'mimalloc-doc.h']]], + ['mi_5fregister_5fdeferred_5ffree_125',['mi_register_deferred_free',['../group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece',1,'mimalloc-doc.h']]], + ['mi_5fregister_5ferror_126',['mi_register_error',['../group__extended.html#gaa1d55e0e894be240827e5d87ec3a1f45',1,'mimalloc-doc.h']]], + ['mi_5fregister_5foutput_127',['mi_register_output',['../group__extended.html#gae5b17ff027cd2150b43a33040250cf3f',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fhuge_5fos_5fpages_5fat_128',['mi_reserve_huge_os_pages_at',['../group__arenas.html#ga7795a13d20087447281858d2c771cca1',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fhuge_5fos_5fpages_5fat_5fex_129',['mi_reserve_huge_os_pages_at_ex',['../group__arenas.html#ga591aab1c2bc2ca920e33f0f9f9cb5c52',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fhuge_5fos_5fpages_5finterleave_130',['mi_reserve_huge_os_pages_interleave',['../group__arenas.html#ga3132f521fb756fc0e8ec0b74fb58df50',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fos_5fmemory_131',['mi_reserve_os_memory',['../group__arenas.html#ga00ec3324b6b2591c7fe3677baa30a767',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fos_5fmemory_5fex_132',['mi_reserve_os_memory_ex',['../group__arenas.html#ga32f519797fd9a81acb4f52d36e6d751b',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_133',['mi_rezalloc',['../group__zeroinit.html#gadfd34cd7b4f2bbda7ae06367a6360756',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_5faligned_134',['mi_rezalloc_aligned',['../group__zeroinit.html#ga4d02404fe1e7db00beb65f185e012caa',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_5faligned_5fat_135',['mi_rezalloc_aligned_at',['../group__zeroinit.html#ga6843a88285bbfcc3bdfccc60aafd1270',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fas_5fjson_136',['mi_stats_as_json',['../group__stats.html#ga6ad266c70a0eabf6c26248aed1af6fa1',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fget_137',['mi_stats_get',['../group__stats.html#gaa26d5060ad21b1331a150bb92f6f7086',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fget_5fbin_5fsize_138',['mi_stats_get_bin_size',['../group__stats.html#gadecd549d1a7216af596322ac27e78b0d',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fget_5fjson_139',['mi_stats_get_json',['../group__stats.html#gadaa3be15899cc82e314fa7d3f8e2afbd',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fmerge_140',['mi_stats_merge',['../group__stats.html#ga854b1de8cb067c7316286c28b2fcd3d1',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fprint_141',['mi_stats_print',['../group__stats.html#ga2d126e5c62d3badc35445e5d84166df2',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fprint_5fout_142',['mi_stats_print_out',['../group__stats.html#ga537f13b299ddf801e49a5a94fde02c79',1,'mimalloc-doc.h']]], + ['mi_5fstats_5freset_143',['mi_stats_reset',['../group__stats.html#ga3bb8468b8cfcc6e2a61d98aee85c5f99',1,'mimalloc-doc.h']]], + ['mi_5fstrdup_144',['mi_strdup',['../group__malloc.html#ga245ac90ebc2cfdd17de599e5fea59889',1,'mimalloc-doc.h']]], + ['mi_5fstrndup_145',['mi_strndup',['../group__malloc.html#ga486d0d26b3b3794f6d1cdb41a9aed92d',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fadd_5fcurrent_5fthread_146',['mi_subproc_add_current_thread',['../group__subproc.html#gadbc53414eb68b275588ec001ce1ddc7c',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fcurrent_147',['mi_subproc_current',['../group__subproc.html#gaabc4db6585bf16099e43e60d64364950',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fdelete_148',['mi_subproc_delete',['../group__subproc.html#gaa7d263e9429bac9ac8345c9d25de610e',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fdestroy_149',['mi_subproc_destroy',['../group__subproc.html#gada12e4d9bd382935c398ec324d0391f9',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fheap_5fstats_5fprint_5fout_150',['mi_subproc_heap_stats_print_out',['../group__stats.html#ga19f1a04bd972e11e4f3b586f25229d5b',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fmain_151',['mi_subproc_main',['../group__subproc.html#ga2ecba0d7ebdc99e71bb985c4a1609806',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fnew_152',['mi_subproc_new',['../group__subproc.html#ga8068cac328e41fa2170faef707315243',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fstats_5fget_153',['mi_subproc_stats_get',['../group__stats.html#ga5ec3f9058eec804924711ab38ba64b51',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fstats_5fget_5fjson_154',['mi_subproc_stats_get_json',['../group__stats.html#gad1cf918f08b6506e65ae134423477a0b',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fstats_5fprint_5fout_155',['mi_subproc_stats_print_out',['../group__stats.html#ga59ec89969837db414a6bce8b58915624',1,'mimalloc-doc.h']]], + ['mi_5fsubproc_5fvisit_5fheaps_156',['mi_subproc_visit_heaps',['../group__subproc.html#gafd2136e7f167b5cd02b6ab00bed0ac93',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fcalloc_157',['mi_theap_calloc',['../group__theap.html#gadbf8f27bfe9edf7834e19d32cab63edc',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fcollect_158',['mi_theap_collect',['../group__theap.html#ga9377a43095b8dd14996613ceb73d9a32',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fget_5fdefault_159',['mi_theap_get_default',['../group__theap.html#ga78afbb07c1e0cd333c7539cf7403dfd5',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fmalloc_160',['mi_theap_malloc',['../group__theap.html#gac7308e029c59e6675dd5ab5ec54f304a',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fmalloc_5faligned_161',['mi_theap_malloc_aligned',['../group__theap.html#ga84503fc2bd83fbfb7f789b7d80d76f36',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fmalloc_5fcsize_162',['mi_theap_malloc_csize',['../group__constantsize.html#ga105bd667da91a15d113fe79be04d625c',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fmalloc_5fsmall_163',['mi_theap_malloc_small',['../group__theap.html#ga1fc65302a212daaecb21abda96ff247c',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5frealloc_164',['mi_theap_realloc',['../group__theap.html#ga11943128dc354313c4189e72f4299dbb',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fset_5fdefault_165',['mi_theap_set_default',['../group__theap.html#ga04420ce52785019412397e4de24a984a',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fzalloc_166',['mi_theap_zalloc',['../group__theap.html#gaa7fd973dcd8c75eb05707bdeffbc06f7',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fzalloc_5fcsize_167',['mi_theap_zalloc_csize',['../group__constantsize.html#ga1addf755829380581dd9c3c9175e376f',1,'mimalloc-doc.h']]], + ['mi_5ftheap_5fzalloc_5fsmall_168',['mi_theap_zalloc_small',['../group__theap.html#gaa85fccf9d40af3e826c5932aded1d534',1,'mimalloc-doc.h']]], + ['mi_5fthread_5fdone_169',['mi_thread_done',['../group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf',1,'mimalloc-doc.h']]], + ['mi_5fthread_5finit_170',['mi_thread_init',['../group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17',1,'mimalloc-doc.h']]], + ['mi_5fthread_5fset_5fin_5fthreadpool_171',['mi_thread_set_in_threadpool',['../group__extended.html#gada899104276aac52539eb4de7c020f1f',1,'mimalloc-doc.h']]], + ['mi_5fusable_5fsize_172',['mi_usable_size',['../group__malloc.html#ga089c859d9eddc5f9b4bd946cd53cebee',1,'mimalloc-doc.h']]], + ['mi_5fvalloc_173',['mi_valloc',['../group__posix.html#ga50cafb9722020402f065de93799f64ca',1,'mimalloc-doc.h']]], + ['mi_5fversion_174',['mi_version',['../group__extended.html#gae9ddddcf14a58d0224ef3c8778e5b057',1,'mimalloc-doc.h']]], + ['mi_5fwcsdup_175',['mi_wcsdup',['../group__posix.html#gaa9fd7f25c9ac3a20e89b33bd6e383fcf',1,'mimalloc-doc.h']]], + ['mi_5fwdupenv_5fs_176',['mi_wdupenv_s',['../group__posix.html#ga6ac6a6a8f3c96f1af24bb8d0439cbbd1',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_177',['mi_zalloc',['../group__malloc.html#gae6e38c4403247a7b40d80419e093bfb8',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5faligned_178',['mi_zalloc_aligned',['../group__aligned.html#gaac7d0beb782f9b9ac31f47492b130f82',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5faligned_5fat_179',['mi_zalloc_aligned_at',['../group__aligned.html#ga7c1778805ce50ebbf02ccbd5e39d5dba',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5fcsize_180',['mi_zalloc_csize',['../group__constantsize.html#gadca6d340ee15b5c70695ed82d95c6cec',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5fsmall_181',['mi_zalloc_small',['../group__extended.html#ga51c47637e81df0e2f13a2d7a2dec123e',1,'mimalloc-doc.h']]] ]; diff --git a/docs/tools.html b/docs/tools.html index fa662b9fa..d969be621 100644 --- a/docs/tools.html +++ b/docs/tools.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/docs/topics.html b/docs/topics.html index bbbae22f2..efbd5b033 100644 --- a/docs/topics.html +++ b/docs/topics.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
@@ -112,7 +112,7 @@  Basic AllocationThe basic allocation interface  Aligned AllocationAllocating aligned memory blocks  Typed MacrosTyped allocation macros - Constant size allocationConstant size allocation and freeing For example: + Constant size allocationInlined definitions for onstant size allocation and freeing  Zero initialized re-allocationRe-allocation of zero initialized blocks  HeapsFirst-class heaps  Heap IntrospectionWalk areas and blocks of the heap at runtime diff --git a/docs/using.html b/docs/using.html index 87f479dce..ee8b7f7e6 100644 --- a/docs/using.html +++ b/docs/using.html @@ -34,7 +34,7 @@ Logo -
mi-malloc 3.4/2.4/1.9 +
mi-malloc 3.5/2.5/1.15
diff --git a/include/mimalloc.h b/include/mimalloc.h index 229e39484..d38988613 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -8,7 +8,7 @@ terms of the MIT license. A copy of the license can be found in the file #ifndef MIMALLOC_H #define MIMALLOC_H -#define MI_MALLOC_VERSION 30500 // major + 2 digits minor + 2 digits patch +#define MI_MALLOC_VERSION 30501 // major + 2 digits minor + 2 digits patch // ------------------------------------------------------ // Compiler specific attributes @@ -133,13 +133,17 @@ mi_decl_nodiscard mi_decl_export void* mi_reallocf(void* p, size_t newsize) mi_decl_nodiscard mi_decl_export size_t mi_usable_size(const void* p) mi_attr_noexcept; mi_decl_nodiscard mi_decl_export size_t mi_good_size(size_t size) mi_attr_noexcept; -// `mi_free_size` can be more efficient (as at calls mi_free_small internally). +// `mi_free_size` can be more efficient (as it calls mi_free_small internally). mi_decl_export void mi_free_size(void* p, size_t size) mi_attr_noexcept; // `mi_free_small` is for special applications like language runtimes. -// it should only be used to free objects from `mi_(heap_)(m|z)alloc_small` and is potentially a tiny bit faster than `mi_free` +// it should only be used to free objects from `mi_*alloc_small` and is potentially a tiny bit faster than `mi_free` mi_decl_export void mi_free_small(void* p) mi_attr_noexcept; +// As `mi_free_small` but `p` should not be a NULL pointer. +mi_decl_export void mi_free_small_nonnull(void* p) mi_attr_noexcept; + + // ------------------------------------------------------------------------------------- // Aligned allocation // Note that `alignment` always follows `size` for consistency with unaligned @@ -405,11 +409,15 @@ static inline mi_decl_restrict void* mi_theap_malloc_csize(mi_theap_t* theap, si if (size <= MI_SMALL_SIZE_MAX) { return mi_theap_malloc_small(theap,size); } else { return mi_theap_malloc(theap,size); } } static inline mi_decl_restrict void* mi_theap_zalloc_csize(mi_theap_t* theap, size_t size) mi_attr_noexcept { - if (size <= MI_SMALL_SIZE_MAX) { return mi_theap_zalloc_small(theap,size); } else { return mi_theap_malloc(theap,size); } + if (size <= MI_SMALL_SIZE_MAX) { return mi_theap_zalloc_small(theap,size); } else { return mi_theap_zalloc(theap,size); } } static inline void mi_free_csize(void* p, size_t size) mi_attr_noexcept { if (size <= MI_SMALL_SIZE_MAX) { mi_free_small(p); } else { mi_free(p); } } +static inline void mi_free_csize_nonnull(void* p, size_t size) mi_attr_noexcept { + // assert(p!=NULL); + if (size <= MI_SMALL_SIZE_MAX) { mi_free_small_nonnull(p); } else { mi_free(p); } +} // ------------------------------------------------------ // Experimental diff --git a/include/mimalloc/atomic.h b/include/mimalloc/atomic.h index ffde71d0c..9c2339802 100644 --- a/include/mimalloc/atomic.h +++ b/include/mimalloc/atomic.h @@ -227,9 +227,11 @@ static inline uintptr_t mi_atomic_load_explicit(_Atomic(uintptr_t) const* p, mi_ if (mo == mi_memory_order_relaxed) { return (uintptr_t)MI_MSC_XX(__iso_volatile_load)((volatile const intptr_t*)p); } + #if !defined(__clang__) // work around __ldar missing in clang-cl, see https://github.com/llvm/llvm-project/issues/121689 else if (mo <= mi_memory_order_acquire) { return MI_MSC_XX(__ldar)((volatile const uintptr_t*)p); } + #endif else { const uintptr_t u = (uintptr_t)MI_MSC_XX(__iso_volatile_load)((volatile const intptr_t*)p); __dmb(15); // _ARM(64)_BARRIER_SY @@ -249,9 +251,11 @@ static inline void mi_atomic_store_explicit(_Atomic(uintptr_t)*p, uintptr_t x, m if (mo == mi_memory_order_relaxed) { MI_MSC_XX(__iso_volatile_store)((volatile intptr_t*)p, x); } + #if !defined(__clang__) // work around __stlr missing in clang-cl, see https://github.com/llvm/llvm-project/issues/121689 else if (mo <= mi_memory_order_release) { MI_MSC_XX(__stlr)((volatile uintptr_t*)p,x); } + #endif else { mi_atomic_exchange_explicit(p, x, mo); } @@ -269,7 +273,7 @@ static inline int64_t mi_atomic_loadi64_explicit(_Atomic(int64_t)*p, mi_memory_o if (mo == mi_memory_order_relaxed) { return __iso_volatile_load64((volatile const int64_t*)p); } - #if defined(_M_ARM64) + #if defined(_M_ARM64) && !defined(__clang__) // work around __ldar64 missing in clang-cl, see https://github.com/llvm/llvm-project/issues/121689 else if (mo <= mi_memory_order_acquire) { return __ldar64((volatile const uintptr_t*)p); } @@ -294,7 +298,7 @@ static inline void mi_atomic_storei64_explicit(_Atomic(int64_t)*p, int64_t x, mi if (mo == mi_memory_order_relaxed) { __iso_volatile_store64((volatile int64_t*)p,x); } - #if defined(_M_ARM64) + #if defined(_M_ARM64) && !defined(__clang__) // work around __stlr64 missing in clang-cl, see https://github.com/llvm/llvm-project/issues/121689 else if (mo == mi_memory_order_release) { __stlr64((volatile uint64_t*)p, (uint64_t)x); } diff --git a/include/mimalloc/internal.h b/include/mimalloc/internal.h index 67a08258b..fdd5c78be 100644 --- a/include/mimalloc/internal.h +++ b/include/mimalloc/internal.h @@ -206,6 +206,7 @@ size_t _mi_os_guard_page_size(void); size_t _mi_os_good_alloc_size(size_t size); bool _mi_os_has_overcommit(void); bool _mi_os_has_virtual_reserve(void); +bool _mi_os_canuse_thp(void); size_t _mi_os_virtual_address_bits(void); size_t _mi_os_minimal_purge_size(void); @@ -774,9 +775,16 @@ static inline mi_page_t* _mi_checked_ptr_page(const void* p) { // without needing to go through the page map (for valid pointers). static inline mi_page_t* _mi_aligned_ptr_page0(const void* p) { mi_page_t* const page_metas = (mi_page_t*)_mi_align_down_ptr(p,MI_PAGE_META_ALIGNMENT); - const ptrdiff_t page_idx = ((uint8_t*)p - (uint8_t*)page_metas)/MI_ARENA_SLICE_SIZE; - mi_assert_internal(page_idx >= 0 && page_idx <= MI_PAGE_META_ALIGNED_COUNT); - return &page_metas[page_idx]; + // const ptrdiff_t page_idx = ((uint8_t*)p - (uint8_t*)page_metas)/MI_ARENA_SLICE_SIZE; + const uintptr_t page_idx = ((uintptr_t)p / MI_ARENA_SLICE_SIZE) % (MI_PAGE_META_ALIGNMENT / MI_ARENA_SLICE_SIZE); + mi_assert_internal(page_idx <= MI_PAGE_META_ALIGNED_COUNT); + #if MI_ARCH_X64 || MI_ARCH_X86 || MI_ARCH_RISCV // better code on x64/x86/riscv64 + mi_page_t* const page = (mi_page_t*)((uintptr_t)page_metas | (page_idx * sizeof(mi_page_t))); + #else + mi_page_t* const page = &page_metas[page_idx]; + #endif + return page; + } static inline mi_page_t* _mi_aligned_ptr_page(const void* p) { @@ -789,7 +797,7 @@ static inline mi_page_t* _mi_aligned_ptr_page(const void* p) { return NULL; } #endif - return mi_atomic_load_acquire(&page->self); + return mi_atomic_load_ptr_acquire(mi_page_t, &page->self); } #endif @@ -853,10 +861,14 @@ static inline size_t mi_page_usable_block_size(const mi_page_t* page) { } static inline bool mi_page_meta_is_separated(const mi_page_t* page) { - #if MI_PAGE_META_IS_ALIGNED - MI_UNUSED_RELEASE(page); - mi_assert_internal(page != _mi_align_down_ptr(mi_page_start(page), MI_ARENA_SLICE_ALIGN)); - return true; + #if MI_PAGE_META_IS_ALIGNED + #if MI_PAGE_META_SMALL_IS_ALIGNED + return (page != _mi_align_down_ptr(mi_page_start(page), MI_ARENA_SLICE_ALIGN)); + #else + MI_UNUSED_RELEASE(page); + mi_assert_internal(page != _mi_align_down_ptr(mi_page_start(page), MI_ARENA_SLICE_ALIGN)); + return true; + #endif #elif MI_PAGE_META_IS_SEPARATED // usually separated but can still be in front for direct OS allocations (due to size or alignment) or due to MI_PAGE_META_SMALL_IS_ALIGNED return (page->memid.memkind == MI_MEM_ARENA && page != _mi_align_down_ptr(mi_page_start(page), MI_ARENA_SLICE_ALIGN)); @@ -1424,32 +1436,34 @@ static inline void mi_rep_stosb(void* dst, uint8_t val, size_t n) { #endif } -static inline void _mi_memcpy(void* dst, const void* src, size_t n) { +static inline void* _mi_memcpy(void* dst, const void* src, size_t n) { if mi_likely(n <= _mi_cpu_movsb_max) { // has fsrm && n <= 127 (todo: and maybe has erms?) mi_rep_movsb(dst, src, n); + return dst; } else { - memcpy(dst, src, n); + return memcpy(dst, src, n); } } -static inline void _mi_memset(void* dst, int val, size_t n) { +static inline void* _mi_memset(void* dst, int val, size_t n) { if mi_likely(n <= _mi_cpu_stosb_max) { // has fsrs && n <= 127 mi_rep_stosb(dst, (uint8_t)val, n); + return dst; } else { - memset(dst, val, n); + return memset(dst, val, n); } } #else -static inline void _mi_memcpy(void* dst, const void* src, size_t n) { - memcpy(dst, src, n); +static inline void* _mi_memcpy(void* dst, const void* src, size_t n) { + return memcpy(dst, src, n); } -static inline void _mi_memset(void* dst, int val, size_t n) { - memset(dst, val, n); +static inline void* _mi_memset(void* dst, int val, size_t n) { + return memset(dst, val, n); } #endif @@ -1462,42 +1476,40 @@ static inline void _mi_memset(void* dst, int val, size_t n) { #if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) // On GCC/CLang we provide a hint that the pointers are word aligned. -static inline void _mi_memcpy_aligned(void* dst, const void* src, size_t n) { +static inline void* _mi_memcpy_aligned(void* dst, const void* src, size_t n) { mi_assert_internal(((uintptr_t)dst % MI_INTPTR_SIZE == 0) && ((uintptr_t)src % MI_INTPTR_SIZE == 0)); void* adst = __builtin_assume_aligned(dst, MI_INTPTR_SIZE); const void* asrc = __builtin_assume_aligned(src, MI_INTPTR_SIZE); - _mi_memcpy(adst, asrc, n); + return _mi_memcpy(adst, asrc, n); } -static inline void _mi_memset_aligned(void* dst, int val, size_t n) { +static inline void* _mi_memset_aligned(void* dst, int val, size_t n) { mi_assert_internal((uintptr_t)dst % MI_INTPTR_SIZE == 0); void* adst = __builtin_assume_aligned(dst, MI_INTPTR_SIZE); - _mi_memset(adst, val, n); + return _mi_memset(adst, val, n); } #else // Default fallback on `_mi_memcpy` -static inline void _mi_memcpy_aligned(void* dst, const void* src, size_t n) { +static inline void* _mi_memcpy_aligned(void* dst, const void* src, size_t n) { mi_assert_internal(((uintptr_t)dst % MI_INTPTR_SIZE == 0) && ((uintptr_t)src % MI_INTPTR_SIZE == 0)); - _mi_memcpy(dst, src, n); + return _mi_memcpy(dst, src, n); } -static inline void _mi_memset_aligned(void* dst, int val, size_t n) { +static inline void* _mi_memset_aligned(void* dst, int val, size_t n) { mi_assert_internal((uintptr_t)dst % MI_INTPTR_SIZE == 0); - _mi_memset(dst, val, n); + return _mi_memset(dst, val, n); } #endif -static inline void _mi_memzero(void* dst, size_t n) { - _mi_memset(dst, 0, n); +static inline void* _mi_memzero(void* dst, size_t n) { + return _mi_memset(dst, 0, n); } -static inline void _mi_memzero_aligned(void* dst, size_t n) { - _mi_memset_aligned(dst, 0, n); +static inline void* _mi_memzero_aligned(void* dst, size_t n) { + return _mi_memset_aligned(dst, 0, n); } - - #endif // MI_INTERNAL_H diff --git a/include/mimalloc/prim-tls.h b/include/mimalloc/prim-tls.h index b0b5c137a..13f5860f9 100644 --- a/include/mimalloc/prim-tls.h +++ b/include/mimalloc/prim-tls.h @@ -66,7 +66,7 @@ static inline mi_theap_t* _mi_page_associated_theap_peek(mi_page_t* page); // #if (defined(__GNUC__) && (__GNUC__ >= 7) && defined(__aarch64__)) /* aarch64 for older gcc versions (issue #851) */ \ || (defined(__GNUC__) && (__GNUC__ >= 7) && defined(__riscv)) \ || (defined(__GNUC__) && (__GNUC__ >= 11) && defined(__x86_64__)) \ - || (defined(__clang_major__) && (__clang_major__ >= 14) && (defined(__aarch64__) || defined(__x86_64__) || defined(__riscv__))) + || (defined(__clang_major__) && (__clang_major__ >= 14) && (defined(__aarch64__) || defined(__x86_64__) || defined(__riscv))) #define MI_USE_BUILTIN_THREAD_POINTER 1 #endif #endif diff --git a/include/mimalloc/types.h b/include/mimalloc/types.h index bb00cdbdd..308c17bd3 100644 --- a/include/mimalloc/types.h +++ b/include/mimalloc/types.h @@ -65,6 +65,8 @@ terms of the MIT license. A copy of the license can be found in the file #define MI_SECURE 0 #endif +#define MI_PADDING 0 + // Define MI_DEBUG for assertion and invariant checking // #define MI_DEBUG 1 // basic assertion checks and statistics, check double free, corrupted free list, and invalid pointer free. (cmake -DMI_DEBUG=ON) // #define MI_DEBUG 2 // + internal assertion checks (cmake -DMI_DEBUG_INTERNAL=ON) @@ -146,22 +148,20 @@ terms of the MIT license. A copy of the license can be found in the file #if MI_PAGE_META_IS_SEPARATED #define MI_PAGE_META_IS_ALIGNED 1 #define MI_PAGE_META_ALIGNED_CHUNKS MI_INTPTR_SIZE -#ifdef MI_PAGE_META_SMALL_IS_ALIGNED -#undef MI_PAGE_META_SMALL_IS_ALIGNED -#endif #else #warning "cannot optimize free with alignment since the page meta data is not separated (due to MI_PAGE_MAP_FLAT?)" #endif #endif -// Deprecated (in favor of MI_PAGE_META_IS_ALIGNED): // We can choose to only put page info of small pages at the start of the page area. // This can be used to have a slightly faster `mi_free_small` function for specialized // cases (like language runtime systems). -#if !MI_PAGE_META_IS_ALIGNED -#if MI_OPT_FREE_SMALL && !defined(MI_PAGE_META_SMALL_IS_ALIGNED) +#if !defined(MI_PAGE_META_SMALL_IS_ALIGNED) +#if defined(MI_OPT_FREE_SMALL) && MI_OPT_FREE_SMALL==0 +#define MI_PAGE_META_SMALL_IS_ALIGNED 0 +#elif (MI_OPT_FREE_SMALL || MI_PAGE_META_IS_ALIGNED) && !MI_SECURE && !MI_GUARDED // cannot be guarded as that may allocate large blocks for small allocations #define MI_PAGE_META_SMALL_IS_ALIGNED 1 -#elif !defined(MI_PAGE_META_SMALL_IS_ALIGNED) +#else #define MI_PAGE_META_SMALL_IS_ALIGNED 0 #endif #endif @@ -568,7 +568,6 @@ struct mi_theap_s { _Atomic(size_t) refcount; // reference count unsigned long long heartbeat; // monotonic heartbeat count - uintptr_t cookie; // random cookie to verify pointers (see `_mi_ptr_cookie`) mi_random_ctx_t random; // random number context used for secure allocation size_t page_count; // total number of pages in the `pages` queues. size_t page_retired_min; // smallest retired index (retired pages are fully free, but still in the page queues) diff --git a/readme.md b/readme.md index a92903b27..dcfc524b1 100644 --- a/readme.md +++ b/readme.md @@ -15,9 +15,9 @@ 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 : `v3.5.0` (2026-08-18) recommended. -Latest v2 release: `v2.5.0` (2026-08-18) stable. -Latest v1 release: `v1.15.0` (2026-08-18) legacy. +Latest release : `v3.5.1` (2026-09-01) recommended. +Latest v2 release: `v2.5.1` (2026-09-01) stable, legacy. +Latest v1 release: `v1.15.1` (2026-09-01) legacy. 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: @@ -84,12 +84,19 @@ New development is mostly on v3, while v1 and v2 are maintained with security an (much) less memory. Also supports true first-class heaps (that can allocate from any thread) and has more efficient heap-walking (for the CPython GC for example). (release tags: `v3.x`, development branch `dev3`). -- __v2__: stable mimalloc version. Uses thread-local segments to reduce fragmentation. (release tags: `v2.x`, development branch `dev2` and `main`) +- __v2__: stable legacy mimalloc version. Uses thread-local segments to reduce fragmentation. (release tags: `v2.x`, development branch `dev2` and `main`) - __v1__: legacy version: initial design of mimalloc (release tags: `v1.x`, development branch `dev`). __Send PR's against this version if possible.__ ### Releases +* 2026-09-01: Added a readme section on [getting the best performance](#getting-the-best-performance). +* 2026-09-01, `v3.5.1`, `v2.5.1`, `v1.15.1`: (v3) Yet better performance for `free` calls. + (v3) Added `mi_free_small(_nonnull)` for runtimes, and `mi_free_csize(_nonnull)` for inlined constant size free-ing. + (v3) Improved MI_OPT_ARCH options; on arm64, defaults to armv8.3 on Apple and armv8.1 otherwise. + (v3) Default to `-DMI_ALLOW_THP=FULL` on Linux, where we never split transparent huge pages (THP) during purging (#1282). This + may increase rss but can also improve performance. Use `-DMI_ALLOW_THP=OFF` to disable the use of THP. + (v3) Improved cache behavior for small allocations. Improved riscV suppor, add riscV to CI. Various small build fixes. * 2026-08-18, `v1.15.0`, `v2.5.0`, `v3.5.0`: (v3) slightly better performance for `free` using aligned chunks, cleanup cmake options, require armv8.3 (with MI_OPT_ARCH) for faster load-acquire, increase retired page count from 1 to 3, faster double free @@ -369,14 +376,15 @@ Advanced options: - `MIMALLOC_PURGE_DECOMMITS=1`: By default "purging" memory means unused memory is decommitted (`MEM_DECOMMIT` on Windows, `MADV_DONTNEED` (which decresease rss immediately) on `mmap` systems). Set this to 0 to instead "reset" unused memory on a purge (`MEM_RESET` on Windows, generally `MADV_FREE` (which does not decrease rss immediately) on `mmap` systems). - Mimalloc generally does not "free" OS memory but only "purges" OS memory, in other words, it tries to keep virtual - address ranges and decommits within those ranges (to make the underlying physical memory available to other processes). + Mimalloc generally does not "free" OS memory but only "purges" OS memory, in other words, it will keep virtual + address ranges, but decommits within those ranges (to make the underlying physical memory available to other processes). Further options for large workloads and services: -- `MIMALLOC_ALLOW_THP=1`: By default always allow transparent huge pages (THP) on Linux systems. On Android only this is - by default off. When set to `0`, THP is disabled for the process that mimalloc runs in. If enabled, mimalloc also sets - the `MIMALLOC_MINIMAL_PURGE_SIZE` in v3 to 2MiB to avoid potentially breaking up transparent huge pages when purging memory. +- `MIMALLOC_ALLOW_THP=[0,1,2]`: When set to `0`, the use of transparent huge pages (THP) is disabled for the process that mimalloc + runs in, and otherwise it is enabled whenever THP is [enabled in the OS][linux-thp] (`[always]` or `[madvise]`). If set to 2 (default on Linux), + mimalloc also sets the `MIMALLOC_MINIMAL_PURGE_SIZE` in v3 to 2MiB to avoid potentially breaking up transparent huge pages when + purging memory which is better for performance (but may increase the rss!). On Android the default setting is 0 to reduce rss. - `MIMALLOC_USE_NUMA_NODES=N`: pretend there are at most `N` NUMA nodes. If not set, the actual NUMA nodes are detected at runtime. Setting `N` to 1 may avoid problems in some virtual environments. Also, setting it to a lower number than the actual NUMA nodes is fine and will only cause threads to potentially allocate more memory across actual NUMA @@ -403,6 +411,7 @@ Use caution when using `fork` in combination with either large or huge OS pages: for all pages in the original process including the huge OS pages. When any memory is now written in that area, the OS will copy the entire 1GiB huge page (or 2MiB large page) which can cause the memory usage to grow in large increments. +[linux-thp]: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/performance_tuning_guide/sect-red_hat_enterprise_linux-performance_tuning_guide-configuring_transparent_huge_pages [linux-huge]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/sect-oracle_9i_and_10g_tuning_guide-large_memory_optimization_big_pages_and_huge_pages-configuring_huge_pages_in_red_hat_enterprise_linux_4_or_5 [windows-huge]: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/enable-the-lock-pages-in-memory-option-windows?view=sql-server-2017 @@ -419,7 +428,7 @@ to make mimalloc more robust against exploits. In particular: - The free lists are initialized in a random order and allocation randomly chooses between extension and reuse within a page to mitigate against attacks that rely on a predicable allocation order. Similarly, the larger heap blocks allocated by mimalloc from the OS are also address randomized. -- If enabling `-DMI_SECURE_FULL=ON` there will also be guard pages at the end of each (64KiB) mimalloc page (thus interleaving +- If using `-DMI_SECURE=FULL` there will also be guard pages at the end of each (64KiB) mimalloc page (thus interleaving valid block data with inaccessible gaps). This setting is not recommended in general as it is more expensive and can lead to reaching the maximum VMA limit on Linux systems if the heap gets too large. @@ -427,7 +436,7 @@ As always, evaluate with care as part of an overall security strategy as all of ## Debug Mode -When _mimalloc_ is built using debug mode, (`-DCMAKE_BUILD_TYPE=Debug`), +When _mimalloc_ is built using debug mode, (`-DCMAKE_BUILD_TYPE=Debug`) (or when using `-DMI_DEBUG=ON` explicitly), 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. @@ -466,6 +475,33 @@ many system calls. Therefore, there are various environment variables (and optio Overriding the standard `malloc` (and `new`) can be done either _dynamically_ or _statically_. + +## Static override + +On Unix like systems, you can statically link with _mimalloc_ to override the standard +malloc interface. The recommended way is to link the final program with the +_mimalloc_ single object file (`mimalloc.o`). 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 _mimalloc_ library, link it as the first +object file. For example: + +``` +> gcc -o myprogram mimalloc.o myfile1.c ... +``` + +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 +under your control or otherwise mixing of pointers from different heaps may occur! + +Note: recently we also enabled static overloading on Windows. In that case you need +to link with the static CRT _release_ runtime (`/MT`) and link with the static +`mimalloc(-debug).obj` (to take precendence over the definitions in the CRT library). + + ## Dynamic override This is the recommended way to override the standard malloc interface. @@ -543,30 +579,55 @@ first in the import table. In such cases the [`minject`](bin) tool can be used to patch the executable's import tables. -## Static override +# Getting the best performance -On Unix-like systems, you can also statically link with _mimalloc_ to override the standard -malloc interface. The recommended way is to link the final program with the -_mimalloc_ single object file (`mimalloc.o`). 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 _mimalloc_ library, link it as the first -object file. For example: +Consider the following build options (v3): -``` -> gcc -o myprogram mimalloc.o myfile1.c ... -``` +- `-DMI_OPT_ARCH=ON` (by default ON on arm64): enables architecture specific optimizations. + This uses `-march=haswell;-march=avx2` on x64 (available since 2013), `-march=armv8.1` on arm64 (2016), + and `-march=rv64gcb_zacas` on riscV (2023). + Each benefits mimalloc with better bit operations and/or native atomic operations (but also, if your + emulator or hardware does not support these extensions the program will fail with an illegal instruction). + On Apple arm64 the default is `-march=armv8.3` (which is supported on the M1 and better) which includes + efficient load-acquire instructions which mimalloc uses. For riscV the corresponding `zalasr` extension + can be enabled as `-DMI_OPT_ARCH=rv64gcb_zacas_zalasr` when your hardware supports it. -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 -under your control or otherwise mixing of pointers from different heaps may occur! +- `-DMI_ALLOW_THP=OFF`: disabling THP can reduce the rss of certain programs significantly. + +- `-DMI_ALLOW_THP=FULL`: enabling THP can increase performance of certain programs significantly. This setting + still disables THP if the OS THP setting is configured as `[never]`. + +- `-DMI_FREE_IS_CHECKED=ON` (by default ON in secure mode): slightly slower performance but checks validity + of every pointer passed to `mi_free`. Sometimes needed when overriding malloc/free process wide. + Note also that `mi_cfree` (checked free) always checks the validity of pointers passed to it which can + also be used if appropiate without needing to check all pointers process wide. + +In the source code: + +- Use `mi_zalloc` for zero initialized allocations. + +- Use the typed macros `mi_malloc_tp` etc. as these are both more safe and also use `mi_malloc_csize` internally. + +- Use `mi_malloc_csize`/`mi_free_csize` etc. when the allocated or free'd size is a constant as these are inlined + and statically redirect to `mi_malloc_small`/`mi_free_small` when possible. + These are also used by the C++ `mimalloc-new-delete.h` sized overrides. + You can use `mi_free_csize_nonnull` when the pointer is guaranteed to be not `NULL` as well. + +- Use `mi_malloc_small` when the allocation size is guaranteed to be less than `MI_SMALL_SIZE_MAX` (1KiB) for faster allocations. + +- Use `mi_free_small` when the pointer was returned from `mi_malloc_small` (and guaranteed to have a + size of less than `MI_SMALL_SIZE_MAX`). Use `mi_free_small_nonnull` when the pointer is guaranteed to be not `NULL` as well. + +For run-time systems and compilers (like Koka, Lean, etc.), we can do slightly better still. + +- If the allocation size is statically known, use `mi_malloc_csize` and `mi_free_csize` etc. when possible. + (or directly `mi_malloc_small`/`mi_free_small`). + +- If the runtime already carries thread local state, it may be faster to get the default `theap` for each thread + up-front (`mi_theap_get_default()`) and use the very fast `mi_theap_malloc(_small)` etc. passing the theap + pointer directly. This avoids having mimalloc look up the thread local pointer all the time. Whether this is + faster depends a bit on the OS implementation of thread local variables. -Note: recently we also enabled static overloading on Windows. In that case you need -to link with the static CRT _release_ runtime (`/MT`) and link with the static -`mimalloc(-debug).obj` (to take precendence over the definitions in the CRT library). # Tools @@ -662,9 +723,11 @@ use a tool like [TraceControl] that is specialized for analyzing mimalloc traces [TraceControl]: https://github.com/xinglonghe/TraceControl + # Performance -Last update: 2021-01-30 +Last update: 2021-01-30. +(Note 2026-09-01: this is a while ago now, many of these allocators have improved over time as well. YMMV.) We tested _mimalloc_ against many other top allocators over a wide range of benchmarks, ranging from various real world programs to diff --git a/src/alloc.c b/src/alloc.c index bb98facbb..945ea0ca3 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -26,6 +26,33 @@ terms of the MIT license. A copy of the license can be found in the file // Allocation // ------------------------------------------------------ +#if MI_PADDING +static mi_decl_noinline void mi_page_block_setup_padding(mi_page_t* page, mi_block_t* block, size_t size) mi_attr_noexcept { + const size_t bsize = mi_page_usable_block_size(page); + mi_padding_t* const padding = (mi_padding_t*)((uint8_t*)block + bsize); + ptrdiff_t delta = ((uint8_t*)padding - (uint8_t*)block - (size - MI_PADDING_SIZE)); + #if (MI_DEBUG>=2) + mi_assert_internal(delta >= 0 && bsize >= (size - MI_PADDING_SIZE + delta)); + #endif + mi_track_mem_defined(padding,sizeof(mi_padding_t)); // note: re-enable since mi_page_usable_block_size may set noaccess + padding->canary = mi_ptr_encode_canary(page,block,page->keys); + padding->delta = (uint32_t)(delta); + #if MI_PADDING_CHECK_BYTES + if (!mi_page_is_huge(page)) { + uint8_t* fill = (uint8_t*)padding - delta; + const size_t maxpad = (delta > MI_MAX_ALIGN_SIZE ? MI_MAX_ALIGN_SIZE : delta); // set at most N initial padding bytes + for (size_t i = 0; i < maxpad; i++) { fill[i] = MI_DEBUG_PADDING; } + } + #endif +} +#else +static mi_decl_maybe_unused mi_decl_noinline void* mi_block_zero(mi_block_t* block, size_t bsize) mi_attr_noexcept { + // const size_t bsize = mi_page_usable_block_size(page); + _mi_memzero_aligned(block, bsize); + return block; +} +#endif + // Fast allocation in a page: just pop from the free list. // Fall back to generic allocation only if the list is empty. // Note: in release mode the (inlined) routine is about 7 instructions with a single test. @@ -41,7 +68,7 @@ static mi_decl_forceinline void* mi_page_malloc_zero(mi_theap_t* theap, mi_page_ mi_block_t* const block = page->free; const mi_used_t used = page->used; #if defined(__GNUC__) - __asm("" : : : "memory"); // alway load used before the test + __asm("" : : : "memory"); // always load the `used` field before the test #endif if (block == NULL) { return _mi_malloc_generic(theap, size, (zero ? 1 : 0), ppage); @@ -52,7 +79,9 @@ static mi_decl_forceinline void* mi_page_malloc_zero(mi_theap_t* theap, mi_page_ // pop from the free list mi_block_t* next = mi_block_next(page,block); mi_track_mem_undefined(block,sizeof(*block)); - block->next = 0; // don't leak internal data + #if MI_SECURE + if (!zero) block->next = 0; // don't leak internal data + #endif page->free = next; page->used = used+1; mi_assert_internal(page->free == NULL || _mi_ptr_page(page->free) == page); @@ -70,6 +99,7 @@ static mi_decl_forceinline void* mi_page_malloc_zero(mi_theap_t* theap, mi_page_ const size_t bsize = mi_page_usable_block_size(page); mi_track_mem_undefined(block, bsize); + // track per-block statistics #if (MI_STAT>0) if (bsize <= MI_LARGE_MAX_OBJ_SIZE) { mi_theap_stat_increase(theap, malloc_normal, bsize); @@ -82,44 +112,28 @@ static mi_decl_forceinline void* mi_page_malloc_zero(mi_theap_t* theap, mi_page_ } #endif + // in debug mode initialize with 0xD0 + #if (MI_DEBUG>0) && !MI_TRACK_ENABLED && !MI_TSAN + if mi_likely(!zero && !mi_page_is_huge(page)) { memset(block, MI_DEBUG_UNINIT, bsize); } + #endif + // zero the block? note: we need to zero the full block size (issue #63) - if mi_likely(!zero) { - // #if MI_SECURE - // block->next = 0; // don't leak internal data - // #endif - #if (MI_DEBUG>0) && !MI_TRACK_ENABLED && !MI_TSAN - if (!mi_page_is_huge(page)) { memset(block, MI_DEBUG_UNINIT, bsize); } - #endif - } - else { + if mi_unlikely(zero) { if (!page->free_is_zero) { - _mi_memzero_aligned(block, bsize); + _mi_memzero_aligned(block,bsize); } else { - block->next = 0; - mi_track_mem_defined(block, bsize); - } + block->next = 0; + mi_track_mem_defined(block, bsize); + } } - + + // setup padding (must come after zero'ing) #if MI_PADDING // && !MI_TRACK_ENABLED - mi_padding_t* const padding = (mi_padding_t*)((uint8_t*)block + bsize); - ptrdiff_t delta = ((uint8_t*)padding - (uint8_t*)block - (size - MI_PADDING_SIZE)); - #if (MI_DEBUG>=2) - mi_assert_internal(delta >= 0 && bsize >= (size - MI_PADDING_SIZE + delta)); - #endif - mi_track_mem_defined(padding,sizeof(mi_padding_t)); // note: re-enable since mi_page_usable_block_size may set noaccess - padding->canary = mi_ptr_encode_canary(page,block,page->keys); - padding->delta = (uint32_t)(delta); - #if MI_PADDING_CHECK_BYTES - if (!mi_page_is_huge(page)) { - uint8_t* fill = (uint8_t*)padding - delta; - const size_t maxpad = (delta > MI_MAX_ALIGN_SIZE ? MI_MAX_ALIGN_SIZE : delta); // set at most N initial padding bytes - for (size_t i = 0; i < maxpad; i++) { fill[i] = MI_DEBUG_PADDING; } - } - #endif + mi_page_block_setup_padding(page,block,size); #endif - return block; + return block; } // extra entries for improved efficiency in `alloc-aligned.c` (and in `page.c:mi_malloc_generic`. @@ -242,7 +256,7 @@ extern mi_decl_forceinline void* _mi_theap_malloc_zero_ex(mi_theap_t* theap, siz } } -inline void* _mi_theap_malloc_zero(mi_theap_t* theap, size_t size, bool zero, mi_page_t** ppage) mi_attr_noexcept { +extern inline void* _mi_theap_malloc_zero(mi_theap_t* theap, size_t size, bool zero, mi_page_t** ppage) mi_attr_noexcept { return _mi_theap_malloc_zero_ex(theap, size, zero, 0, ppage); } @@ -369,7 +383,7 @@ void* mi_expand(void* p, size_t newsize) mi_attr_noexcept { return NULL; #else if (p == NULL) return NULL; - const mi_page_t* const page = mi_validate_ptr_page(p,"mi_expand"); + const mi_page_t* const page = mi_ptr_page_validate(p,"mi_expand"); const size_t size = _mi_page_usable_size(page,p); if (newsize > size) return NULL; return p; // it fits @@ -388,7 +402,7 @@ static mi_decl_forceinline void* mi_theap_realloc_zero_ex(mi_theap_t* theap, voi if (pblock_size_pre!=NULL) { *pblock_size_pre = 0; } } else { - page = mi_validate_ptr_page(p,"mi_realloc"); + page = mi_ptr_page_validate(p,"mi_realloc"); if mi_unlikely(page==NULL) { // invalid pointer if (pblock_size_pre!=NULL) { *pblock_size_pre = 0; } if (pblock_size_post!=NULL) { *pblock_size_post = 0; } @@ -404,7 +418,7 @@ static mi_decl_forceinline void* mi_theap_realloc_zero_ex(mi_theap_t* theap, voi if (theap!=NULL) #endif { - if (mi_page_heap(page)==_mi_theap_heap(theap)) { // and within the same heap + if (mi_page_heap(page)==_mi_theap_heap_peek(theap)) { // and within the same heap mi_assert_internal(p!=NULL); // todo: do not track as the usable size is still the same in the free; adjust potential padding? // mi_track_resize(p,size,newsize) diff --git a/src/arena.c b/src/arena.c index a09a309fe..2bda823bc 100644 --- a/src/arena.c +++ b/src/arena.c @@ -871,9 +871,8 @@ static uint8_t* mi_arenas_page_alloc_fresh_area(mi_theap_t* theap, size_t slice_ return start; } -#if !MI_PAGE_META_IS_ALIGNED // Only used for non-separate pages -static size_t mi_page_block_start(size_t block_size, bool os_align) +mi_decl_maybe_unused static size_t mi_page_block_start(size_t block_size, bool os_align) { size_t offset; #if MI_GUARDED @@ -892,6 +891,7 @@ static size_t mi_page_block_start(size_t block_size, bool os_align) else if (_mi_is_power_of_two(block_size) && block_size <= MI_PAGE_MAX_START_BLOCK_ALIGN2) { // naturally align power-of-2 blocks up to MI_PAGE_MAX_START_BLOCK_ALIGN2 size (4KiB) offset = _mi_align_up(mi_page_info_size(), block_size); + if (block_size < 64) { offset += 3*block_size; } } else if (block_size != 0 && (block_size % MI_PAGE_OSPAGE_BLOCK_ALIGN2) == 0) { // also align large pages that are a multiple of MI_PAGE_OSPAGE_BLOCK_ALIGN2 (4KiB) @@ -903,7 +903,7 @@ static size_t mi_page_block_start(size_t block_size, bool os_align) } return _mi_align_up(offset,MI_MAX_ALIGN_SIZE); } -#endif + // Free a page without modifying page_bin stats static void mi_arenas_page_free_prim(mi_page_t* page); @@ -980,17 +980,25 @@ static mi_page_t* mi_arenas_page_alloc_fresh(mi_theap_t* theap, size_t slice_cou #if MI_PAGE_META_SMALL_IS_ALIGNED // if `block_size <= MI_SMALL_SIZE_MAX` we put the page info in front of the slice, // (note: it is important that `page_meta->block_size == 0` for `mi_arena_page_at_slice`) - if (block_size > MI_SMALL_SIZE_MAX) + if (block_size <= MI_SMALL_SIZE_MAX) { + // put page info in front of the slice + page = (mi_page_t*)slice_start; + block_start = mi_page_block_start(block_size, os_align); + } + else #endif { - page = page_meta; page_meta_is_separate = true; + page = page_meta; block_start = 0; #if !defined(MI_PAGE_BLOCK_START_MAX_OFFSET) #define MI_PAGE_BLOCK_START_MAX_OFFSET (8*MI_INTPTR_BITS) /* 512 */ #endif - if (block_size >= MI_INTPTR_SIZE && block_size <= MI_PAGE_BLOCK_START_MAX_OFFSET && _mi_is_power_of_two(block_size)) { - block_start += block_size; + if (block_size >= MI_INTPTR_SIZE && block_size <= MI_PAGE_BLOCK_START_MAX_OFFSET && + _mi_is_power_of_two(block_size)) + { + block_start = _mi_align_up(mi_page_info_size(), block_size); // to maintain natural alignment + if (block_size < 64) { block_start += 3*block_size; } } mi_assert_internal(page->block_size == 0); _mi_memzero_aligned(page, sizeof(*page)); @@ -1007,7 +1015,10 @@ static mi_page_t* mi_arenas_page_alloc_fresh(mi_theap_t* theap, size_t slice_cou block_start = mi_page_block_start(block_size, os_align); #endif } - mi_assert_internal(block_start % MI_MAX_ALIGN_SIZE == 0); + mi_assert_internal(block_size < MI_MAX_ALIGN_SIZE || block_start % MI_MAX_ALIGN_SIZE == 0); + if (_mi_is_power_of_two(block_size) && block_size <= MI_PAGE_MAX_START_BLOCK_ALIGN2) { + mi_assert_internal(block_start % block_size == 0); // natural alignment (see also alloc_aligned.c) + } // commit first block? size_t commit_size = 0; @@ -1072,14 +1083,13 @@ static mi_page_t* mi_arenas_page_alloc_fresh(mi_theap_t* theap, size_t slice_cou // mi_assert_internal(mi_page_theap(page) == _mi_heap_theap_peek(page->heap)) #if MI_PAGE_META_IS_ALIGNED - mi_atomic_store_ptr_release(mi_page_t,&page->self,page); - if (page_meta_is_separate) { - if (slice_count > 1) { - // at least two for large singleton blocks as guard pages can have a large offset beyond a single slice - for(size_t i = 1; i < max_page_meta_count; i++) { - mi_assert_internal(page[i].block_size == 0); - mi_atomic_store_ptr_release(mi_page_t,&page[i].self,page); - } + mi_assert_internal(page_meta!=NULL); + mi_atomic_store_ptr_release(mi_page_t,&page_meta->self,page); + if (slice_count > 1) { + // at least two for large singleton blocks as guard pages can have a large offset beyond a single slice + for(size_t i = 1; i < max_page_meta_count; i++) { + mi_assert_internal(page_meta[i].block_size == 0); + mi_atomic_store_ptr_release(mi_page_t,&page_meta[i].self,page); } } #if MI_DEBUG>1 diff --git a/src/free.c b/src/free.c index 82ecf2601..5d033aab4 100644 --- a/src/free.c +++ b/src/free.c @@ -14,9 +14,9 @@ terms of the MIT license. A copy of the license can be found in the file // forward declarations mi_decl_nodiscard static bool mi_check_padding_on_free(const mi_page_t* page, const mi_block_t* block, bool is_guarded, size_t* usable_size); +mi_decl_nodiscard static bool mi_check_double_free(const mi_page_t* page, const mi_block_t* block); static size_t mi_page_usable_size_of(const mi_page_t* page, const mi_block_t* block, bool was_guarded); static void mi_stat_free(const mi_page_t* page, const mi_block_t* block); -// static bool mi_check_is_double_free(const mi_page_t* page, const mi_block_t* block); // ------------------------------------------------------ @@ -30,7 +30,7 @@ static inline void mi_free_block_local(mi_page_t* page, mi_block_t* block, bool // checks size_t usable_size; if mi_unlikely(!mi_check_padding_on_free(page, block, was_guarded, &usable_size)) return; - // if mi_unlikely(!mi_check_is_double_free(page,block)) return; // checked with padding + if mi_unlikely(!mi_check_double_free(page,block)) return; // usually checked with padding if (track_stats) { mi_stat_free(page, block); @@ -169,9 +169,9 @@ void mi_decl_noinline _mi_free_generic(mi_page_t* page, bool is_local, void* p) // Get the page belonging to a pointer // Does further checks in debug mode to see if this was a valid pointer. -static inline bool mi_validate_ptr_page_nonnull(const void* p, const char* msg, bool free_small, mi_page_t** ppage) +static mi_decl_forceinline bool mi_ptr_page_is_valid_ex(const void* p, const char* msg, bool free_small, bool check_p_for_null, mi_page_t** ppage) { - MI_UNUSED_RELEASE(msg); + MI_UNUSED_RELEASE(msg); MI_UNUSED(free_small); #if MI_DEBUG if mi_unlikely(((uintptr_t)p & (MI_INTPTR_SIZE - 1)) != 0 && !mi_option_is_enabled(mi_option_guarded_precise)) { _mi_error_message(EINVAL, "%s: invalid (unaligned) pointer: %p\n", msg, p); @@ -180,42 +180,55 @@ static inline bool mi_validate_ptr_page_nonnull(const void* p, const char* msg, #endif mi_page_t* page; + #if MI_PAGE_META_SMALL_IS_ALIGNED + if (free_small) { page = (mi_page_t*)_mi_align_down_ptr(p,MI_SMALL_PAGE_SIZE); } + else + #endif #if MI_PAGE_META_IS_ALIGNED - page = _mi_aligned_ptr_page0(p); - if mi_unlikely(page==NULL) return false; // p==NULL => page==NULL - #if MI_DEBUG - mi_page_t* const cpage = _mi_checked_ptr_page(p); - if mi_unlikely(cpage==NULL) { _mi_error_message(EINVAL, "%s: invalid pointer: %p\n", msg, p); } + { page = _mi_aligned_ptr_page0(p); } + #else + { page = _mi_ptr_page(p); } + #endif + + if mi_unlikely(check_p_for_null && page==NULL) { + #if MI_DEBUG + if (p!=NULL) { _mi_error_message(EINVAL, "%s: invalid pointer: %p\n", msg, p); } #endif + return false; + } + #if MI_DEBUG + mi_page_t* const cpage = _mi_checked_ptr_page(p); + if mi_unlikely(cpage==NULL) { _mi_error_message(EINVAL, "%s: invalid pointer: %p\n", msg, p); } + #endif - #if MI_SMALL_PAGE_SIZE == MI_ARENA_SLICE_SIZE - // for mi_free_small we can avoid a load-acquire - if (free_small) { mi_assert_internal(page == mi_atomic_load_ptr_acquire(mi_page_t,&page->self)); } - else { page = mi_atomic_load_ptr_acquire(mi_page_t,&page->self); } - #else - MI_UNUSED(free_small); - page = mi_atomic_load_ptr_acquire(mi_page_t,&page->self); + #if MI_PAGE_META_IS_ALIGNED + #if MI_PAGE_META_SMALL_IS_ALIGNED + if (free_small) { mi_assert_internal(NULL == mi_atomic_load_ptr_acquire(mi_page_t,&page->self)); } + else + #elif MI_SMALL_PAGE_SIZE == MI_ARENA_SLICE_SIZE && !MI_GUARDED + // for mi_free_small we can avoid a load-acquire (but not when guarded as that may still allocate large blocks) + if (free_small) { mi_assert_internal(page == mi_atomic_load_ptr_acquire(mi_page_t,&page->self)); } + else #endif + { page = mi_atomic_load_ptr_acquire(mi_page_t,&page->self); } + #endif - mi_assert_internal(page!=NULL); - mi_assert(cpage==page /* page_map lookup should be the same as aligned lookup */ ); - #else - MI_UNUSED(free_small); - page = _mi_ptr_page(p); - if mi_unlikely(page==NULL) { - #if MI_DEBUG - if (p!=NULL) { _mi_error_message(EINVAL, "%s: invalid pointer: %p\n", msg, p); } - #endif - return false; - } + mi_assert_internal(page!=NULL); + mi_assert(cpage==page /* page_map lookup should be the same as aligned lookup */ ); + #if !MI_GUARDED + if (free_small) { mi_assert_internal(page->block_size <= mi_good_size(MI_SMALL_SIZE_MAX) /* free small should only be called on small pages */); } #endif *ppage = page; return true; } -static inline mi_page_t* mi_validate_ptr_page(const void* p, const char* msg) { +static mi_decl_forceinline bool mi_ptr_page_is_valid(const void* p, const char* msg, mi_page_t** ppage) { + return mi_ptr_page_is_valid_ex(p,msg,false /* free_small? */, true /* check_p_for_null */, ppage ); +} + +static mi_decl_forceinline mi_page_t* mi_ptr_page_validate(const void* p, const char* msg) { mi_page_t* page; - return (mi_validate_ptr_page_nonnull(p,msg,false,&page) ? page : NULL); + return (mi_ptr_page_is_valid(p,msg,&page) ? page : NULL); } // Free a block @@ -250,14 +263,14 @@ static mi_decl_forceinline void mi_free_nonnull(void* p, mi_page_t* page, size_t void mi_free(void* p) mi_attr_noexcept { mi_page_t* page; - if mi_likely(mi_validate_ptr_page_nonnull(p,"mi_free",false,&page)) { + if mi_likely(mi_ptr_page_is_valid(p,"mi_free",&page)) { mi_free_nonnull(p, page, NULL, true /* allow collect? */); } } void mi_ufree(void* p, size_t* pblock_size) mi_attr_noexcept { mi_page_t* page; - if mi_likely(mi_validate_ptr_page_nonnull(p,"mi_ufree",false,&page)) { + if mi_likely(mi_ptr_page_is_valid(p,"mi_ufree",&page)) { mi_free_nonnull(p, page, pblock_size, true /* allow collect? */); } else { @@ -266,39 +279,24 @@ void mi_ufree(void* p, size_t* pblock_size) mi_attr_noexcept { } void mi_free_small(void* p) mi_attr_noexcept { - #if MI_PAGE_META_SMALL_IS_ALIGNED - // deprecated: We can only call `mi_free_small` for pointers allocated with `mi_(heap_)malloc_small`. - // If we keep page info in front of the page area for small objects, we can find the info - // just by aligning down the pointer instead of looking it up in the page map. - #if MI_GUARDED - #warning "MI_OPT_FREE_SMALL (MI_PAGE_META_SMALL_IS_ALIGNED) ignored as MI_GUARDED is defined" - mi_free(p); - #elif MI_ARENA_SLICE_ALIGN < MI_SMALL_PAGE_SIZE - #warning "MI_OPT_FREE_SMALL (MI_PAGE_META_SMALL_IS_ALIGNED) ignored as the MI_ARENA_SLICE_ALIGN is less than the small page size" - mi_free(p); - #else - mi_page_t* const page = (mi_page_t*)_mi_align_down_ptr(p,MI_SMALL_PAGE_SIZE); - mi_assert(page == mi_validate_ptr_page(p,"mi_free_small")); - mi_assert((void*)page == _mi_align_down_ptr(mi_page_start(page),MI_SMALL_PAGE_SIZE)); - mi_assert(page->block_size <= mi_good_size(MI_SMALL_SIZE_MAX)); // note: not `MI_SMALL_MAX_OBJ_SIZE` as we need to match `mi_(heap_)malloc_small` - mi_free_nonnull(p, page, NULL, true); - #endif - #else - mi_page_t* page; - if mi_likely(mi_validate_ptr_page_nonnull(p,"mi_free_small",true /* is_small? */,&page)) { - mi_free_nonnull(p, page, NULL, true /* allow collect? */); - } - #endif + mi_page_t* page; + if mi_likely(mi_ptr_page_is_valid_ex(p,"mi_free_small",true /* is_small? */,true /*check p for null*/, &page)) { + mi_free_nonnull(p, page, NULL, true /* allow collect? */); + } } -// void _mi_free_subproc_safe_in_page_nonnull(void* p, mi_page_t* page) mi_attr_noexcept { -// mi_free_nonnull(p, page, NULL, false /* allow collect? */); -// } +void mi_free_small_nonnull(void* p) mi_attr_noexcept { + mi_assert(p!=NULL); + mi_page_t* page; + if mi_likely(mi_ptr_page_is_valid_ex(p,"mi_free_small_nonnull",true /* is_small? */,false /*check p for null*/, &page)) { + mi_free_nonnull(p, page, NULL, true /* allow collect? */); + } +} // Free a pointer that is potentially allocated in a different sub-process void _mi_free_subproc_safe(void* p) mi_attr_noexcept { mi_page_t* page; - if mi_likely(mi_validate_ptr_page_nonnull(p,"_mi_free_subproc_safe",false,&page)) { + if mi_likely(mi_ptr_page_is_valid(p,"_mi_free_subproc_safe",&page)) { mi_free_nonnull(p, page, NULL, false /* allow collect? */); } } @@ -310,22 +308,30 @@ void _mi_free_subproc_safe(void* p) mi_attr_noexcept { void mi_free_size(void* p, size_t size) mi_attr_noexcept { MI_UNUSED_RELEASE(size); #if MI_DEBUG - const mi_page_t* const page = mi_validate_ptr_page(p,"mi_free_size"); + const mi_page_t* const page = mi_ptr_page_validate(p,"mi_free_size"); if (page==NULL) return; mi_assert(p!=NULL); const size_t usable = _mi_page_usable_size(page,p); if mi_unlikely(size > usable) { - _mi_error_message(EINVAL, "pointer %p is freed with mi_free_size but the size %zu is greater than the usable size %zu\n", p, size, usable); - mi_free(p); - return; + const mi_block_t* block = _mi_page_ptr_unalign(page, p); + const bool is_guarded = mi_block_ptr_is_guarded(block,p); + if (!is_guarded) { + _mi_error_message(EINVAL, "pointer %p is freed with mi_free_size but the size %zu is greater than the usable size %zu\n", p, size, usable); + mi_free(p); + return; + } } - else if mi_unlikely(size <= MI_SMALL_SIZE_MAX && mi_page_block_size(page) > mi_good_size(MI_SMALL_SIZE_MAX)) { - _mi_error_message(EINVAL, "pointer %p is freed with mi_free_size but the given size %zu is less than the allocated block size %zu\n", p, size, mi_page_block_size(page)); - mi_free(p); - return; + if mi_unlikely(size <= MI_SMALL_SIZE_MAX && mi_page_block_size(page) > mi_good_size(MI_SMALL_SIZE_MAX)) { + const mi_block_t* block = _mi_page_ptr_unalign(page, p); + const bool is_guarded = mi_block_ptr_is_guarded(block,p); + if (!is_guarded) { + _mi_error_message(EINVAL, "pointer %p is freed with mi_free_size but the given size %zu is less than the allocated block size %zu\n (maybe a `new[]` was matched with `delete` instead of `delete[]`?)\n", p, size, mi_page_block_size(page)); + mi_free(p); + return; + } } #endif - #if MI_PAGE_META_SMALL_IS_ALIGNED + #if MI_PAGE_META_SMALL_IS_ALIGNED || MI_PAGE_META_IS_ALIGNED if mi_likely(size <= MI_SMALL_SIZE_MAX) { mi_free_small(p); } @@ -533,7 +539,7 @@ static size_t mi_decl_noinline mi_page_usable_aligned_size_of(const mi_page_t* p size_t _mi_page_usable_size(const mi_page_t* page, const void* p) mi_attr_noexcept { if mi_unlikely(page==NULL) return 0; - mi_assert_internal(mi_validate_ptr_page(p,"_mi_page_usable_size") == page); + mi_assert_internal(mi_ptr_page_validate(p,"_mi_page_usable_size") == page); if mi_likely(!mi_page_has_interior_pointers(page)) { const mi_block_t* block = mi_validate_block_from_ptr(page,p); return mi_page_usable_size_of(page, block, false /* is guarded */); @@ -545,18 +551,19 @@ size_t _mi_page_usable_size(const mi_page_t* page, const void* p) mi_attr_noexce } mi_decl_nodiscard size_t mi_usable_size(const void* p) mi_attr_noexcept { - const mi_page_t* const page = mi_validate_ptr_page(p,"mi_usable_size"); + const mi_page_t* const page = mi_ptr_page_validate(p,"mi_usable_size"); return _mi_page_usable_size(page,p); } // ------------------------------------------------------ -// Deprecated: double free is checked with padding now. +// Deprecated: double free is usually checked with padding now +// as that is faster and works better for cross-thread free'ing. // Check for double free in secure and debug mode // This is somewhat expensive so only enabled for secure mode 4 // ------------------------------------------------------ -#if MI_CHECK_DOUBLE_FREE +#if MI_SECURE>=3 && !MI_PADDING // linear check if the free list contains a specific element static bool mi_list_contains(const mi_page_t* page, const mi_block_t* list, const mi_block_t* elem, const char* list_kind) { const size_t max_count = page->capacity; // can never hold more blocks than the capacity @@ -572,7 +579,7 @@ static bool mi_list_contains(const mi_page_t* page, const mi_block_t* list, cons return false; } -static mi_decl_noinline bool mi_check_is_double_freex(const mi_page_t* page, const mi_block_t* block) { +static mi_decl_noinline bool mi_check_double_freex(const mi_page_t* page, const mi_block_t* block) { // The decoded value is in the same page (or NULL). // Walk the free lists to verify positively if it is already freed if (mi_list_contains(page, page->free, block, "free") || @@ -580,9 +587,9 @@ static mi_decl_noinline bool mi_check_is_double_freex(const mi_page_t* page, con mi_list_contains(page, mi_page_thread_free(page), block, "thread free")) { _mi_error_message(EAGAIN, "double free detected of block %p with size %zu\n", block, mi_page_block_size(page)); - return true; + return false; } - return false; + return true; } // Used for double free checking to avoid checking free lists too frequently @@ -593,20 +600,20 @@ static inline bool mi_block_could_be_double_free(const mi_page_t* page, const mi } // check if `block` was free'd before -static inline bool mi_check_is_double_free(const mi_page_t* page, const mi_block_t* block) { +static inline bool mi_check_double_free(const mi_page_t* page, const mi_block_t* block) { if mi_unlikely(mi_block_could_be_double_free(page,block)) // quick check: next field is aligned in the same page or NULL? { // Suspicious: decoded value a in block is in the same page (or NULL) -- maybe a double free? // (continue in separate function to improve code generation) - return mi_check_is_double_freex(page, block); + return mi_check_double_freex(page, block); } - else return false; + else return true; } #else -static inline bool mi_check_is_double_free(const mi_page_t* page, const mi_block_t* block) { +static inline bool mi_check_double_free(const mi_page_t* page, const mi_block_t* block) { MI_UNUSED(page); MI_UNUSED(block); - return false; + return true; } #endif diff --git a/src/init.c b/src/init.c index 4d85bc23a..68e94aaa2 100644 --- a/src/init.c +++ b/src/init.c @@ -124,7 +124,6 @@ mi_decl_hidden mi_decl_cache_align const mi_theap_t _mi_theap_empty = { MI_ATOMIC_VAR_INIT(NULL), // subproc MI_ATOMIC_VAR_INIT(1), // refcount 0, // heartbeat - 0, // cookie { {0}, {0}, 0, true }, // random 0, // page count MI_BIN_FULL, 0, // page retired min/max @@ -578,10 +577,6 @@ static void mi_process_init_once(void) { mi_reserve_os_memory((size_t)ksize*MI_KiB, true, true); } } - - #if MI_PAGE_META_IS_ALIGNED - mi_assert_internal((sizeof(mi_page_t)%MI_SIZE_SIZE) == 0); // or page->zoffset might not work - #endif } // Initialize the process; called by thread_init or the process loader diff --git a/src/options.c b/src/options.c index a35661ece..da0d6669c 100644 --- a/src/options.c +++ b/src/options.c @@ -104,7 +104,8 @@ int mi_version(void) { #if defined(__ANDROID__) #define MI_DEFAULT_ALLOW_THP 0 #else -#define MI_DEFAULT_ALLOW_THP 1 +// #define MI_DEFAULT_ALLOW_THP 1 // allow THP but purging may split up THP pages +#define MI_DEFAULT_ALLOW_THP 2 // allow THP and set the minimal purge size to 2MiB to avoid breaking them up #endif #endif @@ -171,7 +172,7 @@ static mi_option_desc_t mi_options[_mi_option_last] = MI_OPTION_UNINIT, MI_OPTION(page_cross_thread_max_reclaim) }, // don't reclaim (small) pages across threads if we already own N pages in that size class { MI_DEFAULT_ALLOW_THP, MI_OPTION_UNINIT, MI_OPTION(allow_thp) }, // allow transparent huge pages? (=1) (on Android =0 by default). Set to 0 to disable THP for the process. - { 0, MI_OPTION_UNINIT, MI_OPTION(minimal_purge_size) }, // set minimal purge size (in KiB) (=0). Using 0 resolves to either 64 (or 2048 if `mi_option_allow_thp==2`). + { 0, MI_OPTION_UNINIT, MI_OPTION(minimal_purge_size) }, // set minimal purge size (in KiB) (=0). Using 0 resolves to either 64 (or 2048 if THP is enabled). { MI_DEFAULT_ARENA_MAX_OBJECT_SIZE, MI_OPTION_UNINIT, MI_OPTION(arena_max_object_size) }, // set maximal object size that can be allocated in an arena (in KiB) (=2GiB on 64-bit). { 0, MI_OPTION_UNINIT, MI_OPTION(arena_is_numa_local) }, // associate local numa node with an initial arena allocation @@ -249,10 +250,16 @@ mi_decl_export void mi_options_print_out(mi_output_fun* out, void* arg) mi_attr_ #if MI_TSAN _mi_fprintf(out, arg, "thread santizer enabled\n"); #endif - #if MI_PAGE_META_IS_ALIGNED + #if MI_PAGE_META_IS_ALIGNED && MI_PAGE_META_SMALL_IS_ALIGNED + _mi_fprintf(out, arg, "free: (small) aligned, page size: %zu\n", sizeof(mi_page_t)); + #elif MI_PAGE_META_IS_ALIGNED _mi_fprintf(out, arg, "free: aligned, page size: %zu\n", sizeof(mi_page_t)); + #elif MI_PAGE_META_SMALL_IS_ALIGNED + _mi_fprintf(out, arg, "free: small aligned + pagemap, page size: %zu\n", sizeof(mi_page_t)); #elif MI_FREE_IS_CHECKED _mi_fprintf(out, arg, "free: checked, page size: %zu\n", sizeof(mi_page_t)); + #else + _mi_fprintf(out, arg, "free: pagemap, page size: %zu\n", sizeof(mi_page_t)); #endif #if MI_ENCODE_FREELIST _mi_fprintf(out, arg, "free lists: encoded with %d key(s)\n", MI_PAGE_KEY_COUNT); diff --git a/src/os.c b/src/os.c index c74bc736a..a727cc844 100644 --- a/src/os.c +++ b/src/os.c @@ -41,6 +41,9 @@ bool _mi_os_has_virtual_reserve(void) { return mi_os_mem_config.has_virtual_reserve; } +bool _mi_os_canuse_thp(void) { + return mi_os_mem_config.has_transparent_huge_pages; +} // OS (small) page size size_t _mi_os_page_size(void) { @@ -55,13 +58,19 @@ size_t _mi_os_large_page_size(void) { // minimal purge size. Can be larger than the page size if transparent huge pages are enabled. size_t _mi_os_minimal_purge_size(void) { size_t minsize = mi_option_get_size(mi_option_minimal_purge_size); - if (minsize != 0) { + if (minsize != 0) { + // set by user return _mi_align_up(minsize, _mi_os_page_size()); } else if (mi_os_mem_config.has_transparent_huge_pages && mi_option_get(mi_option_allow_thp) == 2) { + // don't break up THP pages; + // we don't do this by default as that can lead to increased memory usage (see issue #1282). + // on the other hand, breaking up THP pages can lead to performance degradation and perhaps + // allow_thp should be 2 by default (and the user can set the OS THP setting to [never]). return _mi_os_large_page_size(); } else { + // OS page size by default return _mi_os_page_size(); } } diff --git a/src/prim/unix/prim.c b/src/prim/unix/prim.c index bcb065b2d..1838901d5 100644 --- a/src/prim/unix/prim.c +++ b/src/prim/unix/prim.c @@ -463,15 +463,17 @@ static void* unix_mmap(void* addr, size_t size, size_t try_alignment, int protec #if !defined(MI_NO_THP) if (p != NULL && allow_large && mi_option_is_enabled(mi_option_allow_thp) && _mi_os_canuse_large_page(size, try_alignment)) { #if defined(MADV_HUGEPAGE) - // Many Linux systems don't allow MAP_HUGETLB but they support instead - // transparent huge pages (THP). Generally, it is not required to call `madvise` with MADV_HUGE - // though since properly aligned allocations will already use large pages if available - // in that case -- in particular for our large regions (in `memory.c`). - // However, some systems only allow THP if called with explicit `madvise`, so - // when large OS pages are enabled for mimalloc, we call `madvise` anyways. - if (unix_madvise(p, size, MADV_HUGEPAGE) == 0) { - // *is_large = true; // possibly - }; + if (_mi_os_canuse_thp()) { + // Many Linux systems don't allow MAP_HUGETLB but they support instead + // transparent huge pages (THP). Generally, it is not required to call `madvise` with MADV_HUGE + // though since properly aligned allocations will already use large pages if available + // in that case -- in particular for our large regions (in `memory.c`). + // However, some systems only allow THP if called with explicit `madvise`, so + // when large OS pages are enabled for mimalloc, we call `madvise` anyways. + if (unix_madvise(p, size, MADV_HUGEPAGE) == 0) { + // *is_large = true; // possibly + }; + } #elif defined(__sun) struct memcntl_mha cmd = {0}; cmd.mha_pagesize = _mi_os_large_page_size(); diff --git a/src/theap.c b/src/theap.c index 5d37893dd..d9fb4309d 100644 --- a/src/theap.c +++ b/src/theap.c @@ -286,7 +286,7 @@ void _mi_theap_init(mi_theap_t* theap, mi_heap_t* heap, mi_tld_t* tld) else { _mi_random_split(&head_random, &theap->random); // &theap->random is used as nonce so it is ok if threads capture the same head->random } - theap->cookie = _mi_theap_random_next(theap) | 1; + // theap->cookie = _mi_theap_random_next(theap) | 1; mi_theap_guarded_init(theap); // needs theap->random if (!theap->is_detached) { mi_subproc_stat_increase(_mi_theap_subproc(theap),theaps,1); // on subproc to match theap_free_mem diff --git a/test/test-api.c b/test/test-api.c index fb5caf6ff..09a663c33 100644 --- a/test/test-api.c +++ b/test/test-api.c @@ -330,6 +330,24 @@ int main(void) { } result = ok; }; + CHECK_BODY("zalloc-csize-large") { + // mi_theap_zalloc_csize must zero its large branch too: it used to + // delegate sizes above MI_SMALL_SIZE_MAX to the plain malloc path. + mi_theap_t* theap = mi_theap_get_default(); + size_t size = MI_SMALL_SIZE_MAX + 64; + bool ok = true; + for (int round = 0; round < 16 && ok; round++) { + uint8_t* junk = (uint8_t*)mi_theap_malloc(theap, size); + memset(junk, 0xAB, size); + mi_free(junk); + uint8_t* z = (uint8_t*)mi_theap_zalloc_csize(theap, size); + for (size_t i = 0; i < size; i++) { + if (z[i] != 0) { ok = false; break; } + } + mi_free(z); + } + result = ok; + }; CHECK_BODY("zalloc-aligned-small1") { size_t zalloc_size = MI_SMALL_SIZE_MAX / 2; uint8_t* p = (uint8_t*)mi_zalloc_aligned(zalloc_size, MI_MAX_ALIGN_SIZE * 2); @@ -420,7 +438,23 @@ int main(void) { } } + CHECK_BODY("free_small3") { + for(size_t n = 1; n < MI_SMALL_SIZE_MAX/sizeof(int); n *=2) { + const size_t size = n*sizeof(int); + int* p = (int*)mi_zalloc_small(size); + p[n-1] = 42; + mi_free_small(p); + } + } + CHECK_BODY("free_small4") { + for(size_t n = 1; n < MI_SMALL_SIZE_MAX/sizeof(int); n *=2) { + const size_t size = n*sizeof(int); + int* p = (int*)mi_zalloc_small(size); + p[n-1] = 42; + mi_free(p); + } + } // --------------------------------------------------- // Returned block sizes // ---------------------------------------------------