Showing preview only (1,372K chars total). Download the full file or copy to clipboard to get everything.
Repository: microsoft/mimalloc
Branch: main
Commit: 75d69f4ab736
Files: 95
Total size: 1.3 MB
Directory structure:
gitextract_58sidcpj/
├── .gitattributes
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── SECURITY.md
├── azure-pipelines.yml
├── bin/
│ ├── mimalloc-redirect-arm64.lib
│ ├── mimalloc-redirect-arm64ec.lib
│ ├── mimalloc-redirect.lib
│ ├── mimalloc-redirect32.lib
│ └── readme.md
├── cmake/
│ ├── JoinPaths.cmake
│ ├── mimalloc-config-version.cmake
│ └── mimalloc-config.cmake
├── contrib/
│ ├── docker/
│ │ ├── alpine/
│ │ │ └── Dockerfile
│ │ ├── alpine-arm32v7/
│ │ │ └── Dockerfile
│ │ ├── alpine-x86/
│ │ │ └── Dockerfile
│ │ ├── manylinux-x64/
│ │ │ └── Dockerfile
│ │ └── readme.md
│ ├── nuget/
│ │ └── nuget-release-pipeline.yml
│ └── vcpkg/
│ ├── portfile.cmake
│ ├── readme.md
│ ├── usage
│ ├── vcpkg-cmake-wrapper.cmake
│ └── vcpkg.json
├── doc/
│ ├── doxyfile
│ ├── mimalloc-doc.h
│ └── mimalloc-doxygen.css
├── ide/
│ └── vs2022/
│ ├── mimalloc-lib.vcxproj
│ ├── mimalloc-lib.vcxproj.filters
│ ├── mimalloc-override-dll.vcxproj
│ ├── mimalloc-override-dll.vcxproj.filters
│ ├── mimalloc-override-test-dep.vcxproj
│ ├── mimalloc-override-test.vcxproj
│ ├── mimalloc-test-api.vcxproj
│ ├── mimalloc-test-stress.vcxproj
│ ├── mimalloc-test.vcxproj
│ └── mimalloc.sln
├── include/
│ ├── mimalloc/
│ │ ├── atomic.h
│ │ ├── internal.h
│ │ ├── prim.h
│ │ ├── track.h
│ │ └── types.h
│ ├── mimalloc-new-delete.h
│ ├── mimalloc-override.h
│ ├── mimalloc-stats.h
│ └── mimalloc.h
├── mimalloc.pc.in
├── readme.md
├── src/
│ ├── alloc-aligned.c
│ ├── alloc-override.c
│ ├── alloc-posix.c
│ ├── alloc.c
│ ├── arena-abandon.c
│ ├── arena.c
│ ├── bitmap.c
│ ├── bitmap.h
│ ├── free.c
│ ├── heap.c
│ ├── init.c
│ ├── libc.c
│ ├── options.c
│ ├── os.c
│ ├── page-queue.c
│ ├── page.c
│ ├── prim/
│ │ ├── emscripten/
│ │ │ └── prim.c
│ │ ├── osx/
│ │ │ ├── alloc-override-zone.c
│ │ │ └── prim.c
│ │ ├── prim.c
│ │ ├── readme.md
│ │ ├── unix/
│ │ │ └── prim.c
│ │ ├── wasi/
│ │ │ └── prim.c
│ │ └── windows/
│ │ ├── etw-mimalloc.wprp
│ │ ├── etw.h
│ │ ├── etw.man
│ │ ├── prim.c
│ │ └── readme.md
│ ├── random.c
│ ├── segment-map.c
│ ├── segment.c
│ ├── static.c
│ └── stats.c
└── test/
├── CMakeLists.txt
├── main-override-dep.cpp
├── main-override-dep.h
├── main-override-static.c
├── main-override.c
├── main-override.cpp
├── main.c
├── readme.md
├── test-api-fill.c
├── test-api.c
├── test-stress.c
├── test-wrong.c
└── testhelper.h
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
# default behavior is to always use unix style line endings
* text eol=lf
*.png binary
*.pdn binary
*.jpg binary
*.sln binary
*.suo binary
*.vcproj binary
*.patch binary
*.dll binary
*.lib binary
*.exe binary
================================================
FILE: .gitignore
================================================
build
ide/vs20??/*.db
ide/vs20??/*.opendb
ide/vs20??/*.user
ide/vs20??/.vs
ide/vs20??/VTune*
out/
docs/
*.zip
*.tar
*.gz
.vscode
.DS_STore
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.18)
project(libmimalloc C CXX)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
option(MI_SECURE "Use full security mitigations (like guard pages, allocation randomization, double-free mitigation, and free-list corruption detection)" OFF)
option(MI_PADDING "Enable padding to detect heap block overflow (always on in DEBUG or SECURE mode, or with Valgrind/ASAN)" OFF)
option(MI_OVERRIDE "Override the standard malloc interface (i.e. define entry points for 'malloc', 'free', etc)" ON)
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 (implies MI_NO_PADDING=ON)" 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 arm64: '-march=armv8.1-a' (2016))" OFF)
option(MI_SEE_ASM "Generate assembly files" OFF)
option(MI_OSX_INTERPOSE "Use interpose to override standard malloc on macOS" ON)
option(MI_OSX_ZONE "Use malloc zone to override standard malloc on macOS" ON)
option(MI_WIN_REDIRECT "Use redirection module ('mimalloc-redirect') on Windows if compiling mimalloc as a DLL" ON)
option(MI_WIN_USE_FIXED_TLS "Use a fixed TLS slot on Windows to avoid extra tests in the malloc fast path" OFF)
option(MI_LOCAL_DYNAMIC_TLS "Use local-dynamic-tls, a slightly slower but dlopen-compatible thread local storage mechanism (Unix)" OFF)
option(MI_LIBC_MUSL "Enable this when linking with musl libc" OFF)
option(MI_DEBUG "Enable assertion checks (enabled by default in a debug build)" OFF)
option(MI_DEBUG_INTERNAL "Enable assertion and internal invariant checks (enabled by default in a debug build)" OFF)
option(MI_DEBUG_FULL "Enable assertion checks and expensive internal heap invariant checking" OFF)
option(MI_DEBUG_TSAN "Build with thread sanitizer (needs clang)" OFF)
option(MI_DEBUG_UBSAN "Build with undefined-behavior sanitizer (needs clang++)" OFF)
option(MI_TRACK_VALGRIND "Compile with Valgrind support (adds a small overhead)" OFF)
option(MI_TRACK_ASAN "Compile with address sanitizer support (adds a small overhead)" OFF)
option(MI_TRACK_ETW "Compile with Windows event tracing (ETW) support (adds a small overhead)" OFF)
option(MI_BUILD_SHARED "Build shared library" ON)
option(MI_BUILD_STATIC "Build static library" ON)
option(MI_BUILD_OBJECT "Build object library" ON)
option(MI_BUILD_TESTS "Build test executables" ON)
option(MI_SKIP_COLLECT_ON_EXIT "Skip collecting memory on program exit" OFF)
option(MI_NO_PADDING "Force no use of padding even in DEBUG mode etc." OFF)
option(MI_INSTALL_TOPLEVEL "Install directly into $CMAKE_INSTALL_PREFIX instead of PREFIX/lib/mimalloc-version" OFF)
option(MI_NO_THP "Disable transparent huge pages support on Linux/Android for the mimalloc process only" OFF)
option(MI_EXTRA_CPPDEFS "Extra pre-processor definitions (use as `-DMI_EXTRA_CPPDEFS=\"opt1=val1;opt2=val2\"`)" "")
# negated options for vcpkg features
option(MI_NO_USE_CXX "Use plain C compilation (has priority over MI_USE_CXX)" OFF)
option(MI_NO_OPT_ARCH "Do not use architecture specific optimizations (like '-march=armv8.1-a' for example) (has priority over MI_OPT_ARCH)" OFF)
# deprecated options
option(MI_WIN_USE_FLS "Use Fiber local storage on Windows to detect thread termination (deprecated)" OFF)
option(MI_CHECK_FULL "Use full internal invariant checking in DEBUG mode (deprecated, use MI_DEBUG_FULL instead)" OFF)
option(MI_USE_LIBATOMIC "Explicitly link with -latomic (on older systems) (deprecated and detected automatically)" OFF)
include(CheckLinkerFlag) # requires cmake 3.18
include(CheckIncludeFiles)
include(GNUInstallDirs)
include("cmake/mimalloc-config-version.cmake")
set(mi_sources
src/alloc.c
src/alloc-aligned.c
src/alloc-posix.c
src/arena.c
src/bitmap.c
src/heap.c
src/init.c
src/libc.c
src/options.c
src/os.c
src/page.c
src/random.c
src/segment.c
src/segment-map.c
src/stats.c
src/prim/prim.c)
set(mi_cflags "")
set(mi_cflags_static "") # extra flags for a static library build
set(mi_cflags_dynamic "") # extra flags for a shared-object library build
set(mi_libraries "")
if(MI_EXTRA_CPPDEFS)
set(mi_defines ${MI_EXTRA_CPPDEFS})
else()
set(mi_defines "")
endif()
# pass git revision as a define
if(EXISTS "${CMAKE_SOURCE_DIR}/.git/index")
find_package(Git)
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} "describe" OUTPUT_VARIABLE mi_git_describe RESULT_VARIABLE mi_git_res ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(mi_git_res EQUAL "0")
list(APPEND mi_defines "MI_GIT_DESCRIBE=${mi_git_describe}")
# add to dependencies so we rebuild if the git head commit changes
set_property(GLOBAL APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/.git/index")
endif()
endif()
endif()
# -----------------------------------------------------------------------------
# Convenience: set default build type and compiler depending on the build directory
# -----------------------------------------------------------------------------
message(STATUS "")
if (NOT CMAKE_BUILD_TYPE)
if ("${CMAKE_BINARY_DIR}" MATCHES ".*((D|d)ebug|asan|tsan|ubsan|valgrind)$")
message(STATUS "No build type selected, default to 'Debug'")
set(CMAKE_BUILD_TYPE "Debug")
else()
message(STATUS "No build type selected, default to 'Release'")
set(CMAKE_BUILD_TYPE "Release")
endif()
endif()
if (CMAKE_GENERATOR MATCHES "^Visual Studio.*$")
message(STATUS "Note: when building with Visual Studio the build type is specified when building.")
message(STATUS "For example: 'cmake --build . --config=Release")
endif()
if("${CMAKE_BINARY_DIR}" MATCHES ".*(S|s)ecure$")
message(STATUS "Default to secure build")
set(MI_SECURE "ON")
endif()
# Determine architecture
set(MI_OPT_ARCH_FLAGS "")
set(MI_ARCH "unknown")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86|i[3456]86)$" OR CMAKE_GENERATOR_PLATFORM MATCHES "^(x86|Win32)$")
set(MI_ARCH "x86")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|x64|amd64|AMD64)$" OR CMAKE_GENERATOR_PLATFORM STREQUAL "x64" OR "x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES) # must be before arm64
set(MI_ARCH "x64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|armv[89].?|ARM64)$" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64" OR "arm64" IN_LIST CMAKE_OSX_ARCHITECTURES)
set(MI_ARCH "arm64")
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()
else()
set(MI_ARCH ${CMAKE_SYSTEM_PROCESSOR})
endif()
message(STATUS "Architecture: ${MI_ARCH}") # (${CMAKE_SYSTEM_PROCESSOR}, ${CMAKE_GENERATOR_PLATFORM}, ${CMAKE_GENERATOR})")
# negative overrides (mainly to support vcpkg features)
if(MI_NO_USE_CXX)
set(MI_USE_CXX "OFF")
endif()
if(MI_NO_OPT_ARCH)
set(MI_OPT_ARCH "OFF")
elseif(MI_ARCH STREQUAL "arm64")
set(MI_OPT_ARCH "ON") # enable armv8.1-a by default on arm64 unless MI_NO_OPT_ARCH is set
endif()
# -----------------------------------------------------------------------------
# Process options
# -----------------------------------------------------------------------------
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
set(MI_CLANG_CL "ON")
endif()
# put -Wall early so other warnings can be disabled selectively
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang")
if (MI_CLANG_CL)
list(APPEND mi_cflags -W)
else()
list(APPEND mi_cflags -Wall -Wextra -Wpedantic)
endif()
endif()
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
list(APPEND mi_cflags -Wall -Wextra)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Intel")
list(APPEND mi_cflags -Wall)
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")
endif()
if(MI_OVERRIDE)
message(STATUS "Override standard malloc (MI_OVERRIDE=ON)")
if(APPLE)
if(MI_OSX_ZONE)
# use zone's on macOS
message(STATUS " Use malloc zone to override malloc (MI_OSX_ZONE=ON)")
list(APPEND mi_sources src/prim/osx/alloc-override-zone.c)
list(APPEND mi_defines MI_OSX_ZONE=1)
if (NOT MI_OSX_INTERPOSE)
message(STATUS " WARNING: zone overriding usually also needs interpose (use -DMI_OSX_INTERPOSE=ON)")
endif()
endif()
if(MI_OSX_INTERPOSE)
# use interpose on macOS
message(STATUS " Use interpose to override malloc (MI_OSX_INTERPOSE=ON)")
list(APPEND mi_defines MI_OSX_INTERPOSE=1)
if (NOT MI_OSX_ZONE)
message(STATUS " WARNING: interpose usually also needs zone overriding (use -DMI_OSX_ZONE=ON)")
endif()
endif()
if(MI_USE_CXX AND MI_OSX_INTERPOSE)
message(STATUS " WARNING: if dynamically overriding malloc/free, it is more reliable to build mimalloc as C code (use -DMI_USE_CXX=OFF)")
endif()
endif()
endif()
if(WIN32)
if (NOT MI_WIN_REDIRECT)
# use a negative define for backward compatibility
list(APPEND mi_defines MI_WIN_NOREDIRECT=1)
endif()
endif()
if(MI_SECURE)
message(STATUS "Set full secure build (MI_SECURE=ON)")
list(APPEND mi_defines MI_SECURE=4)
endif()
if(MI_TRACK_VALGRIND)
CHECK_INCLUDE_FILES("valgrind/valgrind.h;valgrind/memcheck.h" MI_HAS_VALGRINDH)
if (NOT MI_HAS_VALGRINDH)
set(MI_TRACK_VALGRIND OFF)
message(WARNING "Cannot find the 'valgrind/valgrind.h' and 'valgrind/memcheck.h' -- install valgrind first?")
message(STATUS "Disabling Valgrind support (MI_TRACK_VALGRIND=OFF)")
else()
message(STATUS "Compile with Valgrind support (MI_TRACK_VALGRIND=ON)")
list(APPEND mi_defines MI_TRACK_VALGRIND=1)
endif()
endif()
if(MI_TRACK_ASAN)
if (APPLE AND MI_OVERRIDE)
set(MI_TRACK_ASAN OFF)
message(WARNING "Cannot enable address sanitizer support on macOS if MI_OVERRIDE is ON (MI_TRACK_ASAN=OFF)")
endif()
if (MI_TRACK_VALGRIND)
set(MI_TRACK_ASAN OFF)
message(WARNING "Cannot enable address sanitizer support with also Valgrind support enabled (MI_TRACK_ASAN=OFF)")
endif()
if(MI_TRACK_ASAN)
CHECK_INCLUDE_FILES("sanitizer/asan_interface.h" MI_HAS_ASANH)
if (NOT MI_HAS_ASANH)
set(MI_TRACK_ASAN OFF)
message(WARNING "Cannot find the 'sanitizer/asan_interface.h' -- install address sanitizer support first")
message(STATUS "Compile **without** address sanitizer support (MI_TRACK_ASAN=OFF)")
else()
message(STATUS "Compile with address sanitizer support (MI_TRACK_ASAN=ON)")
list(APPEND mi_defines MI_TRACK_ASAN=1)
list(APPEND mi_cflags -fsanitize=address)
list(APPEND mi_libraries -fsanitize=address)
endif()
endif()
endif()
if(MI_TRACK_ETW)
if(NOT WIN32)
set(MI_TRACK_ETW OFF)
message(WARNING "Can only enable ETW support on Windows (MI_TRACK_ETW=OFF)")
endif()
if (MI_TRACK_VALGRIND OR MI_TRACK_ASAN)
set(MI_TRACK_ETW OFF)
message(WARNING "Cannot enable ETW support with also Valgrind or ASAN support enabled (MI_TRACK_ETW=OFF)")
endif()
if(MI_TRACK_ETW)
message(STATUS "Compile with Windows event tracing support (MI_TRACK_ETW=ON)")
list(APPEND mi_defines MI_TRACK_ETW=1)
endif()
endif()
if(MI_GUARDED)
message(STATUS "Compile guard pages behind certain object allocations (MI_GUARDED=ON)")
list(APPEND mi_defines MI_GUARDED=1)
if(NOT MI_NO_PADDING)
message(STATUS " Disabling padding due to guard pages (MI_NO_PADDING=ON)")
set(MI_NO_PADDING ON)
endif()
endif()
if(MI_SEE_ASM)
message(STATUS "Generate assembly listings (MI_SEE_ASM=ON)")
list(APPEND mi_cflags -save-temps)
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang")
message(STATUS "No GNU Line marker")
list(APPEND mi_cflags -Wno-gnu-line-marker)
endif()
endif()
if(MI_CHECK_FULL)
message(STATUS "The MI_CHECK_FULL option is deprecated, use MI_DEBUG_FULL instead")
set(MI_DEBUG_FULL "ON")
endif()
if (MI_SKIP_COLLECT_ON_EXIT)
message(STATUS "Skip collecting memory on program exit (MI_SKIP_COLLECT_ON_EXIT=ON)")
list(APPEND mi_defines MI_SKIP_COLLECT_ON_EXIT=1)
endif()
if(MI_DEBUG_FULL)
message(STATUS "Set debug level to full assertion and internal invariant checking (MI_DEBUG_FULL=ON, expensive)")
list(APPEND mi_defines MI_DEBUG=3) # full invariant checking (mi_assert, mi_assert_internal, and mi_assert_expensive)
elseif(MI_DEBUG_INTERNAL)
message(STATUS "Set debug level to internal assertion and invariant checking (MI_DEBUG_INTERNAL=ON)")
list(APPEND mi_defines MI_DEBUG=2) # invariant checking (mi_assert and mi_assert_internal)
elseif(MI_DEBUG)
message(STATUS "Set debug level to assertion checking (MI_DEBUG=ON)")
list(APPEND mi_defines MI_DEBUG=1) # assertion checking (mi_assert)
elseif(CMAKE_BUILD_TYPE MATCHES "Debug")
message(STATUS "Set debug level to internal assertion and invariant checking (CMAKE_BUILD_TYPE=Debug)")
set(MI_DEBUG_INTERNAL ON)
list(APPEND mi_defines MI_DEBUG=2) # invariant checking (mi_assert and mi_assert_internal)
endif()
if(MI_NO_PADDING)
message(STATUS "Suppress any padding of heap blocks (MI_NO_PADDING=ON)")
list(APPEND mi_defines MI_PADDING=0)
else()
if(MI_PADDING)
message(STATUS "Enable explicit padding of heap blocks (MI_PADDING=ON)")
list(APPEND mi_defines MI_PADDING=1)
endif()
endif()
if(MI_XMALLOC)
message(STATUS "Enable abort() calls on memory allocation failure (MI_XMALLOC=ON)")
list(APPEND mi_defines MI_XMALLOC=1)
endif()
if(MI_SHOW_ERRORS)
message(STATUS "Enable printing of error and warning messages by default (MI_SHOW_ERRORS=ON)")
list(APPEND mi_defines MI_SHOW_ERRORS=1)
endif()
if(MI_DEBUG_TSAN)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
message(STATUS "Build with thread sanitizer (MI_DEBUG_TSAN=ON)")
list(APPEND mi_defines MI_TSAN=1)
list(APPEND mi_cflags -fsanitize=thread -g -O1)
list(APPEND mi_libraries -fsanitize=thread)
else()
message(WARNING "Can only use thread sanitizer with clang (MI_DEBUG_TSAN=ON but ignored)")
endif()
endif()
if(MI_DEBUG_UBSAN)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(STATUS "Build with undefined-behavior sanitizer (MI_DEBUG_UBSAN=ON)")
list(APPEND mi_defines MI_UBSAN=1)
list(APPEND mi_cflags -fsanitize=undefined -g -fno-sanitize-recover=undefined)
list(APPEND mi_libraries -fsanitize=undefined)
if (NOT MI_USE_CXX)
message(STATUS "(switch to use C++ due to MI_DEBUG_UBSAN)")
set(MI_USE_CXX "ON")
endif()
else()
message(WARNING "Can only use undefined-behavior sanitizer with clang++ (MI_DEBUG_UBSAN=ON but ignored)")
endif()
else()
message(WARNING "Can only use undefined-behavior sanitizer with a debug build (CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})")
endif()
endif()
if(MI_USE_CXX)
message(STATUS "Use the C++ compiler to compile (MI_USE_CXX=ON)")
set_source_files_properties(${mi_sources} PROPERTIES LANGUAGE CXX )
set_source_files_properties(src/static.c test/test-api.c test/test-api-fill test/test-stress PROPERTIES LANGUAGE CXX )
if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang|Clang")
list(APPEND mi_cflags -Wno-deprecated)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Intel" AND NOT CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
list(APPEND mi_cflags -Kc++)
endif()
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
if(MI_NO_THP)
message(STATUS "Disable transparent huge pages support (MI_NO_THP=ON)")
list(APPEND mi_defines MI_NO_THP=1)
endif()
endif()
if(MI_LIBC_MUSL)
message(STATUS "Assume using musl libc (MI_LIBC_MUSL=ON)")
list(APPEND mi_defines MI_LIBC_MUSL=1)
endif()
if(MI_WIN_USE_FLS)
message(STATUS "Use the Fiber API to detect thread termination (deprecated) (MI_WIN_USE_FLS=ON)")
list(APPEND mi_defines MI_WIN_USE_FLS=1)
endif()
if(MI_WIN_USE_FIXED_TLS)
message(STATUS "Use fixed TLS slot on Windows to avoid extra tests in the malloc fast path (MI_WIN_USE_FIXED_TLS=ON)")
list(APPEND mi_defines MI_WIN_USE_FIXED_TLS=1)
endif()
# Check /proc/cpuinfo for an SV39 MMU and limit the virtual address bits.
# (this will skip the aligned hinting in that case. Issue #939, #949)
if (EXISTS /proc/cpuinfo)
file(STRINGS /proc/cpuinfo mi_sv39_mmu REGEX "^mmu[ \t]+:[ \t]+sv39$")
if (mi_sv39_mmu)
MESSAGE( STATUS "Set virtual address bits to 39 (SV39 MMU detected)" )
list(APPEND mi_defines MI_DEFAULT_VIRTUAL_ADDRESS_BITS=39)
endif()
endif()
# On Haiku use `-DCMAKE_INSTALL_PREFIX` instead, issue #788
# if(CMAKE_SYSTEM_NAME MATCHES "Haiku")
# SET(CMAKE_INSTALL_LIBDIR ~/config/non-packaged/lib)
# SET(CMAKE_INSTALL_INCLUDEDIR ~/config/non-packaged/headers)
# endif()
# Compiler flags
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU" AND NOT MI_CLANG_CL)
list(APPEND mi_cflags -Wno-unknown-pragmas -fvisibility=hidden)
if(NOT MI_USE_CXX)
list(APPEND mi_cflags -Wstrict-prototypes)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang")
list(APPEND mi_cflags -Wno-static-in-inline)
endif()
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Intel")
list(APPEND mi_cflags -fvisibility=hidden)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU|Intel" AND NOT CMAKE_SYSTEM_NAME MATCHES "Haiku" AND NOT MI_CLANG_CL)
if(MI_LOCAL_DYNAMIC_TLS)
list(APPEND mi_cflags -ftls-model=local-dynamic)
else()
if(MI_LIBC_MUSL)
# with musl we use local-dynamic for the static build, see issue #644
list(APPEND mi_cflags_static -ftls-model=local-dynamic)
list(APPEND mi_cflags_dynamic -ftls-model=initial-exec)
message(STATUS "Use local dynamic TLS for the static build (since MI_LIBC_MUSL=ON)")
else()
list(APPEND mi_cflags -ftls-model=initial-exec)
endif()
endif()
if(MI_OVERRIDE)
list(APPEND mi_cflags -fno-builtin-malloc)
endif()
endif()
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.1-a")
endif()
elseif(MI_ARCH STREQUAL "arm64")
set(MI_OPT_ARCH_FLAGS "-march=armv8.1-a") # fast atomics
endif()
endif()
endif()
if (MSVC AND MSVC_VERSION GREATER_EQUAL 1914)
list(APPEND mi_cflags /Zc:__cplusplus)
if(MI_OPT_ARCH AND NOT MI_CLANG_CL)
if(MI_ARCH STREQUAL "arm64")
set(MI_OPT_ARCH_FLAGS "/arch:armv8.1") # fast atomics
endif()
endif()
endif()
if(MINGW)
add_definitions(-D_WIN32_WINNT=0x600) # issue #976
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)")
endif()
# extra needed libraries
# we prefer -l<lib> test over `find_library` as sometimes core libraries
# like `libatomic` are not on the system path (see issue #898)
function(find_link_library libname outlibname)
check_linker_flag(C "-l${libname}" mi_has_lib${libname})
if (mi_has_lib${libname})
message(VERBOSE "link library: -l${libname}")
set(${outlibname} ${libname} PARENT_SCOPE)
else()
find_library(MI_LIBPATH_${libname} ${libname})
if (MI_LIBPATH_${libname})
message(VERBOSE "link library ${libname} at ${MI_LIBPATH_${libname}}")
set(${outlibname} ${MI_LIBPATH_${libname}} PARENT_SCOPE)
else()
message(VERBOSE "link library not found: ${libname}")
set(${outlibname} "" PARENT_SCOPE)
endif()
endif()
endfunction()
if(WIN32)
list(APPEND mi_libraries psapi shell32 user32 advapi32 bcrypt)
else()
find_link_library("pthread" MI_LIB_PTHREAD)
if(MI_LIB_PTHREAD)
list(APPEND mi_libraries "${MI_LIB_PTHREAD}")
endif()
find_link_library("rt" MI_LIB_RT)
if(MI_LIB_RT)
list(APPEND mi_libraries "${MI_LIB_RT}")
endif()
find_link_library("atomic" MI_LIB_ATOMIC)
if(MI_LIB_ATOMIC)
list(APPEND mi_libraries "${MI_LIB_ATOMIC}")
endif()
endif()
# -----------------------------------------------------------------------------
# Install and output names
# -----------------------------------------------------------------------------
# dynamic/shared library and symlinks always go to /usr/local/lib equivalent
# we use ${CMAKE_INSTALL_BINDIR} and ${CMAKE_INSTALL_LIBDIR}.
# static libraries and object files, includes, and cmake config files
# are either installed at top level, or use versioned directories for side-by-side installation (default)
if (MI_INSTALL_TOPLEVEL)
set(mi_install_objdir "${CMAKE_INSTALL_LIBDIR}")
set(mi_install_incdir "${CMAKE_INSTALL_INCLUDEDIR}")
set(mi_install_cmakedir "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc")
else()
set(mi_install_objdir "${CMAKE_INSTALL_LIBDIR}/mimalloc-${mi_version}") # for static library and object files
set(mi_install_incdir "${CMAKE_INSTALL_INCLUDEDIR}/mimalloc-${mi_version}") # for includes
set(mi_install_cmakedir "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info
endif()
set(mi_libname "mimalloc")
if(MI_SECURE)
set(mi_libname "${mi_libname}-secure")
endif()
if(MI_TRACK_VALGRIND)
set(mi_libname "${mi_libname}-valgrind")
endif()
if(MI_TRACK_ASAN)
set(mi_libname "${mi_libname}-asan")
endif()
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
list(APPEND mi_defines "MI_CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE_LC}") #todo: multi-config project needs $<CONFIG> ?
if(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$")
list(APPEND mi_defines MI_BUILD_RELEASE)
else()
set(mi_libname "${mi_libname}-${CMAKE_BUILD_TYPE_LC}") #append build type (e.g. -debug) if not a release version
endif()
if(MI_BUILD_SHARED)
list(APPEND mi_build_targets "shared")
endif()
if(MI_BUILD_STATIC)
list(APPEND mi_build_targets "static")
endif()
if(MI_BUILD_OBJECT)
list(APPEND mi_build_targets "object")
endif()
if(MI_BUILD_TESTS)
list(APPEND mi_build_targets "tests")
endif()
message(STATUS "")
message(STATUS "Library name : ${mi_libname}")
message(STATUS "Version : ${mi_version}.${mi_version_patch}")
message(STATUS "Build type : ${CMAKE_BUILD_TYPE_LC}")
if(MI_USE_CXX)
message(STATUS "C++ Compiler : ${CMAKE_CXX_COMPILER}")
else()
message(STATUS "C Compiler : ${CMAKE_C_COMPILER}")
endif()
message(STATUS "Compiler flags : ${mi_cflags}")
message(STATUS "Compiler defines : ${mi_defines}")
message(STATUS "Link libraries : ${mi_libraries}")
message(STATUS "Build targets : ${mi_build_targets}")
message(STATUS "")
# -----------------------------------------------------------------------------
# Main targets
# -----------------------------------------------------------------------------
# shared library
if(MI_BUILD_SHARED)
add_library(mimalloc SHARED ${mi_sources})
set_target_properties(mimalloc PROPERTIES VERSION ${mi_version} SOVERSION ${mi_version_major} OUTPUT_NAME ${mi_libname} )
target_compile_definitions(mimalloc PRIVATE ${mi_defines} MI_SHARED_LIB MI_SHARED_LIB_EXPORT)
target_compile_options(mimalloc PRIVATE ${mi_cflags} ${mi_cflags_dynamic})
target_link_libraries(mimalloc PRIVATE ${mi_libraries})
target_include_directories(mimalloc PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${mi_install_incdir}>
)
install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir})
if(WIN32 AND NOT MINGW)
# On windows, the import library name for the dll would clash with the static mimalloc.lib library
# so we postfix the dll import library with `.dll.lib` (and also the .pdb debug file)
set_property(TARGET mimalloc PROPERTY ARCHIVE_OUTPUT_NAME "${mi_libname}.dll" )
install(FILES "$<TARGET_FILE_DIR:mimalloc>/${mi_libname}.dll.lib" DESTINATION ${CMAKE_INSTALL_LIBDIR})
set_property(TARGET mimalloc PROPERTY PDB_NAME "${mi_libname}.dll")
# don't try to install the pdb since it may not be generated depending on the configuration
# install(FILES "$<TARGET_FILE_DIR:mimalloc>/${mi_libname}.dll.pdb" DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(WIN32 AND MI_WIN_REDIRECT)
if(MINGW)
set_property(TARGET mimalloc PROPERTY PREFIX "")
endif()
# On windows, link and copy the mimalloc redirection dll too.
if(CMAKE_GENERATOR_PLATFORM STREQUAL "arm64ec")
set(MIMALLOC_REDIRECT_SUFFIX "-arm64ec")
elseif(MI_ARCH STREQUAL "x64")
set(MIMALLOC_REDIRECT_SUFFIX "")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
message(STATUS "Note: x64 code emulated on Windows for arm64 should use an arm64ec build of 'mimalloc.dll'")
message(STATUS " together with 'mimalloc-redirect-arm64ec.dll'. See the 'bin\\readme.md' for more information.")
endif()
elseif(MI_ARCH STREQUAL "x86")
set(MIMALLOC_REDIRECT_SUFFIX "32")
else()
set(MIMALLOC_REDIRECT_SUFFIX "-${MI_ARCH}") # -arm64 etc.
endif()
target_link_libraries(mimalloc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.lib) # the DLL import library
add_custom_command(TARGET mimalloc POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" $<TARGET_FILE_DIR:mimalloc>
COMMENT "Copy mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll to output directory")
install(FILES "$<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
endif()
# static library
if (MI_BUILD_STATIC)
add_library(mimalloc-static STATIC ${mi_sources})
set_property(TARGET mimalloc-static PROPERTY OUTPUT_NAME ${mi_libname})
set_property(TARGET mimalloc-static PROPERTY POSITION_INDEPENDENT_CODE ON)
target_compile_definitions(mimalloc-static PRIVATE ${mi_defines} MI_STATIC_LIB)
target_compile_options(mimalloc-static PRIVATE ${mi_cflags} ${mi_cflags_static})
target_link_libraries(mimalloc-static PRIVATE ${mi_libraries})
target_include_directories(mimalloc-static PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${mi_install_incdir}>
)
install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_objdir} LIBRARY)
install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir})
endif()
# install include files
install(FILES include/mimalloc.h DESTINATION ${mi_install_incdir})
install(FILES include/mimalloc-override.h DESTINATION ${mi_install_incdir})
install(FILES include/mimalloc-new-delete.h DESTINATION ${mi_install_incdir})
install(FILES include/mimalloc-stats.h DESTINATION ${mi_install_incdir})
install(FILES cmake/mimalloc-config.cmake DESTINATION ${mi_install_cmakedir})
install(FILES cmake/mimalloc-config-version.cmake DESTINATION ${mi_install_cmakedir})
# single object file for more predictable static overriding
if (MI_BUILD_OBJECT)
add_library(mimalloc-obj OBJECT src/static.c)
set_property(TARGET mimalloc-obj PROPERTY POSITION_INDEPENDENT_CODE ON)
target_compile_definitions(mimalloc-obj PRIVATE ${mi_defines})
target_compile_options(mimalloc-obj PRIVATE ${mi_cflags} ${mi_cflags_static})
target_include_directories(mimalloc-obj PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${mi_install_incdir}>
)
# Copy the generated object file (`static.o`) to the output directory (as `mimalloc.o`)
if(CMAKE_GENERATOR MATCHES "^Visual Studio.*$")
set(mimalloc-obj-static "${CMAKE_CURRENT_BINARY_DIR}/mimalloc-obj.dir/$<CONFIG>/static${CMAKE_C_OUTPUT_EXTENSION}")
else()
set(mimalloc-obj-static "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/mimalloc-obj.dir/src/static.c${CMAKE_C_OUTPUT_EXTENSION}")
endif()
set(mimalloc-obj-out "${CMAKE_CURRENT_BINARY_DIR}/${mi_libname}${CMAKE_C_OUTPUT_EXTENSION}")
add_custom_command(OUTPUT ${mimalloc-obj-out} DEPENDS mimalloc-obj COMMAND "${CMAKE_COMMAND}" -E copy "${mimalloc-obj-static}" "${mimalloc-obj-out}")
add_custom_target(mimalloc-obj-target ALL DEPENDS ${mimalloc-obj-out})
# the following seems to lead to cmake warnings/errors on some systems, disable for now :-(
# install(TARGETS mimalloc-obj EXPORT mimalloc DESTINATION ${mi_install_objdir})
# the FILES expression can also be: $<TARGET_OBJECTS:mimalloc-obj>
# but that fails cmake versions less than 3.10 so we leave it as is for now
install(FILES ${mimalloc-obj-static}
DESTINATION ${mi_install_objdir}
RENAME ${mi_libname}${CMAKE_C_OUTPUT_EXTENSION} )
endif()
# pkg-config file support
set(mi_pc_libraries "")
foreach(item IN LISTS mi_libraries)
if(item MATCHES " *[-].*")
set(mi_pc_libraries "${mi_pc_libraries} ${item}")
else()
set(mi_pc_libraries "${mi_pc_libraries} -l${item}")
endif()
endforeach()
include("cmake/JoinPaths.cmake")
join_paths(mi_pc_includedir "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
join_paths(mi_pc_libdir "\${prefix}" "${CMAKE_INSTALL_LIBDIR}")
configure_file(mimalloc.pc.in mimalloc.pc @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/mimalloc.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
# -----------------------------------------------------------------------------
# API surface testing
# -----------------------------------------------------------------------------
if (MI_BUILD_TESTS)
enable_testing()
# static link tests
foreach(TEST_NAME api api-fill stress)
add_executable(mimalloc-test-${TEST_NAME} test/test-${TEST_NAME}.c)
target_compile_definitions(mimalloc-test-${TEST_NAME} PRIVATE ${mi_defines})
target_compile_options(mimalloc-test-${TEST_NAME} PRIVATE ${mi_cflags})
target_include_directories(mimalloc-test-${TEST_NAME} PRIVATE include)
if(MI_BUILD_STATIC AND NOT MI_DEBUG_TSAN)
target_link_libraries(mimalloc-test-${TEST_NAME} PRIVATE mimalloc-static ${mi_libraries})
elseif(MI_BUILD_SHARED)
target_link_libraries(mimalloc-test-${TEST_NAME} PRIVATE mimalloc ${mi_libraries})
else()
message(STATUS "cannot build TSAN tests without MI_BUILD_SHARED being enabled")
endif()
add_test(NAME test-${TEST_NAME} COMMAND mimalloc-test-${TEST_NAME})
endforeach()
# dynamic override test
if(MI_BUILD_SHARED AND NOT (MI_TRACK_ASAN OR MI_DEBUG_TSAN OR MI_DEBUG_UBSAN))
add_executable(mimalloc-test-stress-dynamic test/test-stress.c)
target_compile_definitions(mimalloc-test-stress-dynamic PRIVATE ${mi_defines} "USE_STD_MALLOC=1")
target_compile_options(mimalloc-test-stress-dynamic PRIVATE ${mi_cflags})
target_include_directories(mimalloc-test-stress-dynamic PRIVATE include)
if(WIN32)
target_compile_definitions(mimalloc-test-stress-dynamic PRIVATE "MI_LINK_VERSION=1") # link mi_version
target_link_libraries(mimalloc-test-stress-dynamic PRIVATE mimalloc ${mi_libraries}) # link mi_version
add_test(NAME test-stress-dynamic COMMAND ${CMAKE_COMMAND} -E env MIMALLOC_VERBOSE=1 $<TARGET_FILE:mimalloc-test-stress-dynamic>)
else()
target_link_libraries(mimalloc-test-stress-dynamic PRIVATE ${mi_libraries}) # pthreads, issue 1158
if(APPLE)
set(LD_PRELOAD "DYLD_INSERT_LIBRARIES")
else()
set(LD_PRELOAD "LD_PRELOAD")
endif()
add_test(NAME test-stress-dynamic COMMAND ${CMAKE_COMMAND} -E env MIMALLOC_VERBOSE=1 ${LD_PRELOAD}=$<TARGET_FILE:mimalloc> $<TARGET_FILE:mimalloc-test-stress-dynamic>)
endif()
endif()
endif()
# -----------------------------------------------------------------------------
# Set override properties
# -----------------------------------------------------------------------------
if (MI_OVERRIDE)
if (MI_BUILD_SHARED)
target_compile_definitions(mimalloc PRIVATE MI_MALLOC_OVERRIDE)
endif()
if(NOT WIN32)
# It is only possible to override malloc on Windows when building as a DLL.
if (MI_BUILD_STATIC)
target_compile_definitions(mimalloc-static PRIVATE MI_MALLOC_OVERRIDE)
endif()
if (MI_BUILD_OBJECT)
target_compile_definitions(mimalloc-obj PRIVATE MI_MALLOC_OVERRIDE)
endif()
endif()
endif()
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2018-2025 Microsoft Corporation, Daan Leijen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: SECURITY.md
================================================
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->
## Security
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.
## Reporting Security Issues
**Please do not report security vulnerabilities through public GitHub issues.**
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly.
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.
## Preferred Languages
We prefer all communications to be in English.
## Policy
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).
<!-- END MICROSOFT SECURITY.MD BLOCK -->
================================================
FILE: azure-pipelines.yml
================================================
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
branches:
include:
- main
- dev*
tags:
include:
- v*
jobs:
- job:
displayName: Windows 2022
pool:
vmImage:
windows-2022
strategy:
matrix:
Debug:
BuildType: debug
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
MSBuildConfiguration: Debug
Release:
BuildType: release
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release
MSBuildConfiguration: Release
Secure:
BuildType: secure
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
MSBuildConfiguration: Release
Debug x86:
BuildType: debug
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -A Win32
MSBuildConfiguration: Debug
Release x86:
BuildType: release
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release -A Win32
MSBuildConfiguration: Release
Debug Fixed TLS:
BuildType: debug
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_WIN_USE_FIXED_TLS=ON
MSBuildConfiguration: Debug
Release Fixed TLS:
BuildType: release
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release -DMI_WIN_USE_FIXED_TLS=ON
MSBuildConfiguration: Release
steps:
- task: CMake@1
inputs:
workingDirectory: $(BuildType)
cmakeArgs: .. $(cmakeExtraArgs)
- task: MSBuild@1
inputs:
solution: $(BuildType)/libmimalloc.sln
configuration: '$(MSBuildConfiguration)'
msbuildArguments: -m
- script: ctest --verbose --timeout 240 -C $(MSBuildConfiguration)
workingDirectory: $(BuildType)
displayName: CTest
#- script: $(BuildType)\$(BuildType)\mimalloc-test-stress
# displayName: TestStress
#- upload: $(Build.SourcesDirectory)/$(BuildType)
# artifact: mimalloc-windows-$(BuildType)
- job:
displayName: Ubuntu 22.04
pool:
vmImage:
ubuntu-22.04
strategy:
matrix:
Debug:
CC: gcc
CXX: g++
BuildType: debug
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
Release:
CC: gcc
CXX: g++
BuildType: release
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release
Secure:
CC: gcc
CXX: g++
BuildType: secure
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
Debug++:
CC: gcc
CXX: g++
BuildType: debug-cxx
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_USE_CXX=ON
Debug Clang:
CC: clang
CXX: clang++
BuildType: debug-clang
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
Release Clang:
CC: clang
CXX: clang++
BuildType: release-clang
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release
Secure Clang:
CC: clang
CXX: clang++
BuildType: secure-clang
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
Debug++ Clang:
CC: clang
CXX: clang++
BuildType: debug-clang-cxx
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_USE_CXX=ON
Debug ASAN Clang:
CC: clang
CXX: clang++
BuildType: debug-asan-clang
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_TRACK_ASAN=ON
Debug UBSAN Clang:
CC: clang
CXX: clang++
BuildType: debug-ubsan-clang
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_DEBUG_UBSAN=ON
Debug TSAN Clang++:
CC: clang
CXX: clang++
BuildType: debug-tsan-clang-cxx
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMI_USE_CXX=ON -DMI_DEBUG_TSAN=ON
Debug Guarded Clang:
CC: clang
CXX: clang
BuildType: debug-guarded-clang
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMI_DEBUG_FULL=ON -DMI_GUARDED=ON
steps:
- task: CMake@1
inputs:
workingDirectory: $(BuildType)
cmakeArgs: .. $(cmakeExtraArgs)
- script: make -j$(nproc) -C $(BuildType)
displayName: Make
- script: ctest --verbose --timeout 240
workingDirectory: $(BuildType)
displayName: CTest
env:
MIMALLOC_GUARDED_SAMPLE_RATE: 1000
# - upload: $(Build.SourcesDirectory)/$(BuildType)
# artifact: mimalloc-ubuntu-$(BuildType)
- job:
displayName: macOS 14 (Sonoma)
pool:
vmImage:
macOS-14
strategy:
matrix:
Debug:
BuildType: debug
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
Release:
BuildType: release
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release
Secure:
BuildType: secure
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
steps:
- task: CMake@1
inputs:
workingDirectory: $(BuildType)
cmakeArgs: .. $(cmakeExtraArgs)
- script: make -j$(sysctl -n hw.ncpu) -C $(BuildType)
displayName: Make
- script: ctest --verbose --timeout 240
workingDirectory: $(BuildType)
displayName: CTest
# - upload: $(Build.SourcesDirectory)/$(BuildType)
# artifact: mimalloc-macos-$(BuildType)
# ----------------------------------------------------------
# Other OS versions (just debug mode)
# ----------------------------------------------------------
- job:
displayName: Ubuntu 24.04
pool:
vmImage:
ubuntu-24.04
strategy:
matrix:
Debug:
CC: gcc
CXX: g++
BuildType: debug
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
Debug++:
CC: gcc
CXX: g++
BuildType: debug-cxx
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_USE_CXX=ON
Debug Clang:
CC: clang
CXX: clang++
BuildType: debug-clang
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
Debug++ Clang:
CC: clang
CXX: clang++
BuildType: debug-clang-cxx
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_USE_CXX=ON
Release Clang:
CC: clang
CXX: clang++
BuildType: release-clang
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release
steps:
- task: CMake@1
inputs:
workingDirectory: $(BuildType)
cmakeArgs: .. $(cmakeExtraArgs)
- script: make -j$(nproc) -C $(BuildType)
displayName: Make
- script: ctest --verbose --timeout 240
workingDirectory: $(BuildType)
displayName: CTest
- job:
displayName: macOS 15 (Sequoia)
pool:
vmImage:
macOS-15
strategy:
matrix:
Debug:
BuildType: debug
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
Release:
BuildType: release
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release
steps:
- task: CMake@1
inputs:
workingDirectory: $(BuildType)
cmakeArgs: .. $(cmakeExtraArgs)
- script: make -j$(sysctl -n hw.ncpu) -C $(BuildType)
displayName: Make
- script: ctest --verbose --timeout 240
workingDirectory: $(BuildType)
displayName: CTest
================================================
FILE: bin/readme.md
================================================
# Windows Override
<span id="override_on_windows">We use a separate redirection DLL to override mimalloc on Windows</span>
such that we redirect all malloc/free calls that go through the (dynamic) C runtime allocator,
including those from other DLL's or libraries. As it intercepts all allocation calls on a low level,
it can be used on large programs that include other 3rd party components.
There are four requirements to make the overriding work well:
1. Use the C-runtime library as a DLL (using the `/MD` or `/MDd` switch).
2. Link your program explicitly with the `mimalloc.dll.lib` export library for
the `mimalloc.dll` -- which contains all mimalloc functionality.
To ensure the `mimalloc.dll` is actually loaded at run-time it is easiest
to insert some call to the mimalloc API in the `main` function, like `mi_version()`
(or use the `/include:mi_version` switch on the linker, or
similarly, `#pragma comment(linker, "/include:mi_version")` in some source file).
See the `mimalloc-test-override` project for an example on how to use this.
3. The `mimalloc-redirect.dll` must be put in the same folder as the main
`mimalloc.dll` at runtime (as it is a dependency of that DLL).
The redirection DLL ensures that all calls to the C runtime malloc API get
redirected to mimalloc functions (which reside in `mimalloc.dll`).
4. Ensure the `mimalloc.dll` comes as early as possible in the import
list of the final executable (so it can intercept all potential allocations).
You can use `minject -l <exe>` to check this if needed.
```csharp
┌──────────────┐
│ Your Program │
└────┬─────────┘
│
│ mi_version() ┌───────────────┐ ┌───────────────────────┐
├──────────────►│ mimalloc.dll ├────►│ mimalloc-redirect.dll │
│ └──────┬────────┘ └───────────────────────┘
│ ▼
│ malloc() etc. ┌──────────────┐
├──────────────►│ ucrtbase.dll │
│ └──────────────┘
│
│
└──────────────► ...
```
For best performance on Windows with C++, it
is also recommended to also override the `new`/`delete` operations (by including
[`mimalloc-new-delete.h`](../include/mimalloc-new-delete.h)
a single(!) source file in your project).
The environment variable `MIMALLOC_DISABLE_REDIRECT=1` can be used to disable dynamic
overriding at run-time. Use `MIMALLOC_VERBOSE=1` to check if mimalloc was successfully
redirected.
### Other Platforms
You always link with `mimalloc.dll` but for different platforms you may
need a specific redirection DLL:
- __x64__: `mimalloc-redirect.dll`.
- __x86__: `mimalloc-redirect32.dll`. Use for older 32-bit Windows programs.
- __arm64__: `mimalloc-redirect-arm64.dll`. Use for native Windows arm64 programs.
- __arm64ec__: `mimalloc-redirect-arm64ec.dll`. The [arm64ec] ABI is "emulation compatible"
mode on Windows arm64. Unfortunately we cannot run x64 code emulated on Windows arm64 with
the x64 mimalloc override directly (since the C runtime always uses `arm64ec`). Instead:
1. Build the program as normal for x64 and link as normal with the x64
`mimalloc.lib` export library.
2. Now separately build `mimalloc.dll` in `arm64ec` mode and _overwrite_ your
previous (x64) `mimalloc.dll` -- the loader can handle the mix of arm64ec
and x64 code. Now use `mimalloc-redirect-arm64ec.dll` to match your new
arm64ec `mimalloc.dll`. The main program stays as is and can be fully x64
or contain more arm64ec modules. At runtime, the arm64ec `mimalloc.dll` will
run with native arm64 instructions while the rest of the program runs emulated x64.
[arm64ec]: https://learn.microsoft.com/en-us/windows/arm/arm64ec
### Minject
We cannot always re-link an executable with `mimalloc.dll`, and similarly, we
cannot always ensure that the DLL comes first in the import table of the final executable.
In many cases though we can patch existing executables without any recompilation
if they are linked with the dynamic C runtime (`ucrtbase.dll`) -- just put the
`mimalloc.dll` into the import table (and put `mimalloc-redirect.dll` in the same
directory) Such patching can be done for example with [CFF Explorer](https://ntcore.com/?page_id=388).
The `minject` program can also do this from the command line
Use `minject --help` for options:
```
> minject --help
minject:
Injects the mimalloc dll into the import table of a 64-bit executable,
and/or ensures that it comes first in het import table.
usage:
> minject [options] <exe>
options:
-h --help show this help
-v --verbose be verbose
-l --list only list imported modules
-i --inplace update the exe in-place (make sure there is a backup!)
-f --force always overwrite without prompting
--postfix=<p> use <p> as a postfix to the mimalloc dll.
e.g. use --postfix=debug to link with mimalloc-debug.dll
notes:
Without '--inplace' an injected <exe> is generated with the same name ending in '-mi'.
Ensure 'mimalloc-redirect.dll' is in the same folder as the mimalloc dll.
examples:
> minject --list myprogram.exe
> minject --force --inplace myprogram.exe
```
For x86 32-bit binaries, use `minject32`, and for arm64 binaries use `minject-arm64`.
================================================
FILE: cmake/JoinPaths.cmake
================================================
# This module provides function for joining paths
# known from most languages
#
# SPDX-License-Identifier: (MIT OR CC0-1.0)
# Copyright 2020 Jan Tojnar
# https://github.com/jtojnar/cmake-snips
#
# Modelled after Python’s os.path.join
# https://docs.python.org/3.7/library/os.path.html#os.path.join
# Windows not supported
function(join_paths joined_path first_path_segment)
set(temp_path "${first_path_segment}")
foreach(current_segment IN LISTS ARGN)
if(NOT ("${current_segment}" STREQUAL ""))
if(IS_ABSOLUTE "${current_segment}")
set(temp_path "${current_segment}")
else()
set(temp_path "${temp_path}/${current_segment}")
endif()
endif()
endforeach()
set(${joined_path} "${temp_path}" PARENT_SCOPE)
endfunction()
================================================
FILE: cmake/mimalloc-config-version.cmake
================================================
set(mi_version_major 2)
set(mi_version_minor 2)
set(mi_version_patch 7)
set(mi_version ${mi_version_major}.${mi_version_minor})
set(PACKAGE_VERSION ${mi_version})
if(PACKAGE_FIND_VERSION_MAJOR)
if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "${mi_version_major}")
if ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL "${mi_version_minor}")
set(PACKAGE_VERSION_EXACT TRUE)
elseif("${PACKAGE_FIND_VERSION_MINOR}" LESS "${mi_version_minor}")
set(PACKAGE_VERSION_COMPATIBLE TRUE)
else()
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
else()
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
endif()
================================================
FILE: cmake/mimalloc-config.cmake
================================================
include(${CMAKE_CURRENT_LIST_DIR}/mimalloc.cmake)
get_filename_component(MIMALLOC_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}" PATH) # one up from the cmake dir, e.g. /usr/local/lib/cmake/mimalloc-2.0
get_filename_component(MIMALLOC_VERSION_DIR "${CMAKE_CURRENT_LIST_DIR}" NAME)
string(REPLACE "/lib/cmake" "/lib" MIMALLOC_LIBRARY_DIR "${MIMALLOC_CMAKE_DIR}")
if("${MIMALLOC_VERSION_DIR}" EQUAL "mimalloc")
# top level install
string(REPLACE "/lib/cmake" "/include" MIMALLOC_INCLUDE_DIR "${MIMALLOC_CMAKE_DIR}")
set(MIMALLOC_OBJECT_DIR "${MIMALLOC_LIBRARY_DIR}")
else()
# versioned
string(REPLACE "/lib/cmake/" "/include/" MIMALLOC_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}")
string(REPLACE "/lib/cmake/" "/lib/" MIMALLOC_OBJECT_DIR "${CMAKE_CURRENT_LIST_DIR}")
endif()
set(MIMALLOC_TARGET_DIR "${MIMALLOC_LIBRARY_DIR}") # legacy
================================================
FILE: contrib/docker/alpine/Dockerfile
================================================
# alpine image
FROM alpine
# Install tools
RUN apk add build-base make cmake
RUN apk add git
RUN apk add vim
RUN mkdir -p /home/dev
WORKDIR /home/dev
# Get mimalloc
RUN git clone https://github.com/microsoft/mimalloc -b dev2
RUN mkdir -p mimalloc/out/release
RUN mkdir -p mimalloc/out/debug
# Build mimalloc debug
WORKDIR /home/dev/mimalloc/out/debug
RUN cmake ../.. -DMI_DEBUG_FULL=ON
RUN make -j
RUN make test
CMD ["/bin/sh"]
================================================
FILE: contrib/docker/alpine-arm32v7/Dockerfile
================================================
# install from an image
# download first an appropriate tar.gz image into the current directory
# from <https://github.com/alpinelinux/docker-alpine/tree/edge/armv7>
FROM scratch
# Substitute the image name that was downloaded
ADD alpine-minirootfs-20240329-armv7.tar.gz /
# Install tools
RUN apk add build-base make cmake
RUN apk add git
RUN apk add vim
RUN mkdir -p /home/dev
WORKDIR /home/dev
# Get mimalloc
RUN git clone https://github.com/microsoft/mimalloc -b dev2
RUN mkdir -p mimalloc/out/release
RUN mkdir -p mimalloc/out/debug
# Build mimalloc debug
WORKDIR /home/dev/mimalloc/out/debug
RUN cmake ../.. -DMI_DEBUG_FULL=ON
RUN make -j
RUN make test
CMD ["/bin/sh"]
================================================
FILE: contrib/docker/alpine-x86/Dockerfile
================================================
# install from an image
# download first an appropriate tar.gz image into the current directory
# from <https://github.com/alpinelinux/docker-alpine/tree/edge/x86>
FROM scratch
# Substitute the image name that was downloaded
ADD alpine-minirootfs-20250108-x86.tar.gz /
# Install tools
RUN apk add build-base make cmake
RUN apk add git
RUN apk add vim
RUN mkdir -p /home/dev
WORKDIR /home/dev
# Get mimalloc
RUN git clone https://github.com/microsoft/mimalloc -b dev2
RUN mkdir -p mimalloc/out/release
RUN mkdir -p mimalloc/out/debug
# Build mimalloc debug
WORKDIR /home/dev/mimalloc/out/debug
RUN cmake ../.. -DMI_DEBUG_FULL=ON
# RUN make -j
# RUN make test
CMD ["/bin/sh"]
================================================
FILE: contrib/docker/manylinux-x64/Dockerfile
================================================
FROM quay.io/pypa/manylinux2014_x86_64
# Install tools
RUN yum install -y openssl-devel
RUN yum install -y gcc gcc-c++ kernel-devel make
RUN yum install -y git cmake
RUN yum install -y vim
RUN mkdir -p /home/dev
WORKDIR /home/dev
# Get mimalloc
RUN git clone https://github.com/microsoft/mimalloc -b dev2
RUN mkdir -p mimalloc/out/release
RUN mkdir -p mimalloc/out/debug
# Build mimalloc debug
WORKDIR /home/dev/mimalloc/out/debug
RUN cmake ../.. -DMI_DEBUG_FULL=ON
RUN make -j
RUN make test
CMD ["/bin/sh"]
================================================
FILE: contrib/docker/readme.md
================================================
Various example docker files used for testing.
Usage:
```
> cd <host>
> docker build -t <host>-mimalloc .
> docker run -it <host>-mimalloc
>> make test
```
================================================
FILE: contrib/nuget/nuget-release-pipeline.yml
================================================
# Microsoft.Mimalloc NuGet Release Pipeline
# Manually triggered pipeline to build, sign, and publish the mimalloc NuGet package.
# Builds x64 and ARM64 Windows binaries, signs via ESRP, and packs NuGet.
trigger: none
pr: none
parameters:
- name: version
displayName: 'NuGet package version'
type: string
default: '1.0.0'
- name: buildConfig
displayName: 'Build configuration'
type: string
default: 'Release'
values:
- Release
- Debug
- name: signBinaries
displayName: 'Sign binaries (ESRP)?'
type: string
default: 'No'
values:
- 'Yes'
- 'No'
- name: publishToFeed
displayName: 'Publish NuGet to artifact feed?'
type: boolean
default: false
variables:
nuspecPath: '$(Build.SourcesDirectory)/contrib/nuget/Microsoft.Mimalloc.nuspec'
artifactStaging: '$(Build.ArtifactStagingDirectory)'
================================================
FILE: contrib/vcpkg/portfile.cmake
================================================
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO microsoft/mimalloc
HEAD_REF master
# The "REF" can be a commit hash, branch name (dev3), or a version (v3.2.7).
REF "v${VERSION}"
# REF e2db21e9ba9fb9172b7b0aa0fe9b8742525e8774
# The sha512 is the hash of the tar.gz bundle.
# (To get the sha512, run `vcpkg install "mimalloc[override]" --overlay-ports=<dir of this file>` and copy the sha from the error message.)
SHA512 5830ceb1bf0d02f50fe586caaad87624ba8eba1bb66e68e8201894221cf6f51854f5a9667fc98358c3b430dae6f9bf529bfcb74d42debe6f40a487265053371c
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
c MI_NO_USE_CXX
guarded MI_GUARDED
secure MI_SECURE
override MI_OVERRIDE
optarch MI_OPT_ARCH
nooptarch MI_NO_OPT_ARCH
optsimd MI_OPT_SIMD
xmalloc MI_XMALLOC
asm MI_SEE_ASM
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" MI_BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" MI_BUILD_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DMI_USE_CXX=ON
-DMI_BUILD_TESTS=OFF
-DMI_BUILD_OBJECT=ON
-DMI_BUILD_STATIC=${MI_BUILD_STATIC}
-DMI_BUILD_SHARED=${MI_BUILD_SHARED}
-DMI_INSTALL_TOPLEVEL=ON
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
file(COPY
"${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
"${CMAKE_CURRENT_LIST_DIR}/usage"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/mimalloc)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
# todo: why is this needed?
vcpkg_replace_string(
"${CURRENT_PACKAGES_DIR}/include/mimalloc.h"
"!defined(MI_SHARED_LIB)"
"0 // !defined(MI_SHARED_LIB)"
)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_fixup_pkgconfig()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
================================================
FILE: contrib/vcpkg/readme.md
================================================
# Vcpkg support
This directory is meant to provide the sources for the official [vcpkg port]
of mimalloc, but can also be used to override the official port with
your own variant.
For example, you can edit the [`portfile.cmake`](portfile.cmake)
to check out a specific commit, version, or branch of mimalloc, or set further options.
You can install such custom port as:
```sh
$ vcpkg install "mimalloc[override]" --recurse --overlay-ports=./contrib/vcpkg
```
This will also show the correct sha512 hash if you use a custom version.
Another way is to refer to the overlay from the [vcpkg-configuration.json](https://learn.microsoft.com/en-us/vcpkg/reference/vcpkg-configuration-json) file.
See also the vcpkg [documentation](https://learn.microsoft.com/en-us/vcpkg/produce/update-package-version) for more information.
# Using mimalloc from vcpkg
When using [cmake with vcpkg](https://learn.microsoft.com/en-us/vcpkg/get_started/get-started?pivots=shell-powershell),
you can use mimalloc from the `CMakeLists.txt` as:
```cmake
find_package(mimalloc CONFIG REQUIRED)
target_link_libraries(main PRIVATE mimalloc)
```
See [`test/CMakeLists.txt](../../test/CMakeLists.txt) for more examples.
# Acknowledgements
The original port for vckpg was contributed by many people, including: @vicroms, @myd7349, @PhoubeHui, @LilyWangL,
@JonLiu1993, @RT2Code, Remy Tassoux, @wangao, @BillyONeal, @jiayuehua, @dg0yt, @gerar-ryan-immersaview, @nickdademo,
and @jimwang118 -- Thank you so much!
[vcpkg port]: https://github.com/microsoft/vcpkg/tree/master/ports/mimalloc
================================================
FILE: contrib/vcpkg/usage
================================================
Use the following CMake targets to import mimalloc:
find_package(mimalloc CONFIG REQUIRED)
target_link_libraries(main PRIVATE mimalloc)
And use mimalloc in your sources as:
#include <mimalloc.h>
#include <stdio.h>
int main(int argc, char** argv) {
int* p = mi_malloc_tp(int);
*p = mi_version();
printf("mimalloc version: %d\n", *p);
mi_free(p);
return 0;
}
When dynamically overriding on Windows, ensure `mimalloc.dll` is linked through some call to
mimalloc (e.g. `mi_version()`), and that the `mimalloc-redirect.dll` is in the same directory.
See https://github.com/microsoft/mimalloc/blob/dev/bin/readme.md for detailed information.
================================================
FILE: contrib/vcpkg/vcpkg-cmake-wrapper.cmake
================================================
_find_package(${ARGS})
if(CMAKE_CURRENT_LIST_DIR STREQUAL "${MIMALLOC_CMAKE_DIR}/${MIMALLOC_VERSION_DIR}")
set(MIMALLOC_INCLUDE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")
# As in vcpkg.cmake
if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$")
set(MIMALLOC_LIBRARY_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib")
else()
set(MIMALLOC_LIBRARY_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib")
endif()
set(MIMALLOC_OBJECT_DIR "${MIMALLOC_LIBRARY_DIR}")
set(MIMALLOC_TARGET_DIR "${MIMALLOC_LIBRARY_DIR}")
endif()
# vcpkg always configures either a static or dynamic library.
# ensure to always expose the mimalloc target as either the static or dynamic build.
if(TARGET mimalloc-static AND NOT TARGET mimalloc)
add_library(mimalloc INTERFACE IMPORTED)
set_target_properties(mimalloc PROPERTIES INTERFACE_LINK_LIBRARIES mimalloc-static)
endif()
================================================
FILE: contrib/vcpkg/vcpkg.json
================================================
{
"name": "mimalloc",
"version": "3.2.8",
"port-version": 0,
"description": "Compact general purpose allocator with excellent performance",
"homepage": "https://github.com/microsoft/mimalloc",
"license": "MIT",
"supports": "!uwp",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"c": {
"description": "Use C11 compilation (this can still override new/delete)"
},
"override": {
"description": "Override the standard malloc/free interface"
},
"secure": {
"description": "Use full security mitigations (like guard pages and randomization)"
},
"guarded": {
"description": "Use build that support guard pages after objects controlled with MIMALLOC_GUARDED_SAMPLE_RATE"
},
"xmalloc": {
"description": "If out-of-memory, call abort() instead of returning NULL"
},
"optarch": {
"description": "Use architecture specific optimizations (on x64: '-march=haswell;-mavx2', on arm64: '-march=armv8.1-a')"
},
"nooptarch": {
"description": "Do _not_ use architecture specific optimizations (on x64: '-march=haswell;-mavx2', on arm64: '-march=armv8.1-a')"
},
"optsimd": {
"description": "Allow use of SIMD instructions (avx2 or neon) (requires 'optarch' to be enabled)"
},
"asm": {
"description": "Generate assembly files"
}
}
}
================================================
FILE: doc/doxyfile
================================================
# Doxyfile 1.11.0
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
#
# All text after a double hash (##) is considered a comment and is placed in
# front of the TAG it is preceding.
#
# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
# TAG = value [value, ...]
# For lists, items can also be appended using:
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (\" \").
#
# Note:
#
# Use doxygen to compare the used configuration file with the template
# configuration file:
# doxygen -x [configFile]
# Use doxygen to compare the used configuration file with the template
# configuration file without replacing the environment variables or CMake type
# replacement variables:
# doxygen -x_noenv [configFile]
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
# This tag specifies the encoding used for all characters in the configuration
# file that follow. The default is UTF-8 which is also the encoding used for all
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
# iconv built into libc) for the transcoding. See
# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
# The default value is: UTF-8.
DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
# double-quotes, unless you are using Doxywizard) that should identify the
# project for which the documentation is generated. This name is used in the
# title of most generated pages and in a few other places.
# The default value is: My Project.
PROJECT_NAME = mi-malloc
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 1.8/2.1
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF =
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.
PROJECT_LOGO = mimalloc-logo.svg
# With the PROJECT_ICON tag one can specify an icon that is included in the tabs
# when the HTML document is shown. Doxygen will copy the logo to the output
# directory.
PROJECT_ICON =
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = ..
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
# sub-directories (in 2 levels) under the output directory of each output format
# and will distribute the generated files over these directories. Enabling this
# option can be useful when feeding doxygen a huge amount of source files, where
# putting all generated files in the same directory would otherwise causes
# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to
# control the number of sub-directories.
# The default value is: NO.
CREATE_SUBDIRS = NO
# Controls the number of sub-directories that will be created when
# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every
# level increment doubles the number of directories, resulting in 4096
# directories at level 8 which is the default and also the maximum value. The
# sub-directories are organized in 2 levels, the first level always has a fixed
# number of 16 directories.
# Minimum value: 0, maximum value: 8, default value: 8.
# This tag requires that the tag CREATE_SUBDIRS is set to YES.
CREATE_SUBDIRS_LEVEL = 8
# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
# characters to appear in the names of generated files. If set to NO, non-ASCII
# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
# U+3044.
# The default value is: NO.
ALLOW_UNICODE_NAMES = NO
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian,
# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English
# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek,
# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with
# English messages), Korean, Korean-en (Korean with English messages), Latvian,
# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese,
# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish,
# Swedish, Turkish, Ukrainian and Vietnamese.
# The default value is: English.
OUTPUT_LANGUAGE = English
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
# descriptions after the members that are listed in the file and class
# documentation (similar to Javadoc). Set to NO to disable this.
# The default value is: YES.
BRIEF_MEMBER_DESC = YES
# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
# description of a member or function before the detailed description
#
# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
# The default value is: YES.
REPEAT_BRIEF = YES
# This tag implements a quasi-intelligent brief description abbreviator that is
# used to form the text in various listings. Each string in this list, if found
# as the leading text of the brief description, will be stripped from the text
# and the result, after processing the whole list, is used as the annotated
# text. Otherwise, the brief description is used as-is. If left blank, the
# following values are used ($name is automatically replaced with the name of
# the entity):The $name class, The $name widget, The $name file, is, provides,
# specifies, contains, represents, a, an and the.
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
# doxygen will generate a detailed section even if there is only a brief
# description.
# The default value is: NO.
ALWAYS_DETAILED_SEC = NO
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
# inherited members of a class in the documentation of that class as if those
# members were ordinary class members. Constructors, destructors and assignment
# operators of the base classes will not be shown.
# The default value is: NO.
INLINE_INHERITED_MEMB = NO
# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
# before files name in the file list and in the header files. If set to NO the
# shortest path that makes the file name unique will be used
# The default value is: YES.
FULL_PATH_NAMES = YES
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
# Stripping is only done if one of the specified strings matches the left-hand
# part of the path. The tag can be used to show relative paths in the file list.
# If left blank the directory from which doxygen is run is used as the path to
# strip.
#
# Note that you can specify absolute paths here, but also relative paths, which
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
STRIP_FROM_PATH =
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
# header file to include in order to use a class. If left blank only the name of
# the header file containing the class definition is used. Otherwise one should
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
STRIP_FROM_INC_PATH =
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
# less readable) file names. This can be useful is your file systems doesn't
# support long names like on DOS, Mac, or CD-ROM.
# The default value is: NO.
SHORT_NAMES = NO
# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
# first line (until the first dot) of a Javadoc-style comment as the brief
# description. If set to NO, the Javadoc-style will behave just like regular Qt-
# style comments (thus requiring an explicit @brief command for a brief
# description.)
# The default value is: NO.
JAVADOC_AUTOBRIEF = YES
# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
# such as
# /***************
# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
# Javadoc-style will behave just like regular comments and it will not be
# interpreted by doxygen.
# The default value is: NO.
JAVADOC_BANNER = NO
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
# line (until the first dot) of a Qt-style comment as the brief description. If
# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
# requiring an explicit \brief command for a brief description.)
# The default value is: NO.
QT_AUTOBRIEF = NO
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
# a brief description. This used to be the default behavior. The new default is
# to treat a multi-line C++ comment block as a detailed description. Set this
# tag to YES if you prefer the old behavior instead.
#
# Note that setting this tag to YES also means that rational rose comments are
# not recognized any more.
# The default value is: NO.
MULTILINE_CPP_IS_BRIEF = NO
# By default Python docstrings are displayed as preformatted text and doxygen's
# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
# doxygen's special commands can be used and the contents of the docstring
# documentation blocks is shown as doxygen documentation.
# The default value is: YES.
PYTHON_DOCSTRING = YES
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
# documentation from any documented member that it re-implements.
# The default value is: YES.
INHERIT_DOCS = YES
# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
# page for each member. If set to NO, the documentation of a member will be part
# of the file/class/namespace that contains it.
# The default value is: NO.
SEPARATE_MEMBER_PAGES = NO
# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
# uses this value to replace tabs by spaces in code fragments.
# Minimum value: 1, maximum value: 16, default value: 4.
TAB_SIZE = 2
# This tag can be used to specify a number of aliases that act as commands in
# the documentation. An alias has the form:
# name=value
# For example adding
# "sideeffect=@par Side Effects:^^"
# will allow you to put the command \sideeffect (or @sideeffect) in the
# documentation, which will result in a user-defined paragraph with heading
# "Side Effects:". Note that you cannot put \n's in the value part of an alias
# to insert newlines (in the resulting output). You can put ^^ in the value part
# of an alias to insert a newline as if a physical newline was in the original
# file. When you need a literal { or } or , in the value part of an alias you
# have to escape them by means of a backslash (\), this can lead to conflicts
# with the commands \{ and \} for these it is advised to use the version @{ and
# @} or use a double escape (\\{ and \\})
ALIASES =
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
# instance, some of the names that are used will be different. The list of all
# members will be omitted, etc.
# The default value is: NO.
OPTIMIZE_OUTPUT_FOR_C = YES
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
# Python sources only. Doxygen will then generate output that is more tailored
# for that language. For instance, namespaces will be presented as packages,
# qualified scopes will look different, etc.
# The default value is: NO.
OPTIMIZE_OUTPUT_JAVA = NO
# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
# sources. Doxygen will then generate output that is tailored for Fortran.
# The default value is: NO.
OPTIMIZE_FOR_FORTRAN = NO
# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
# sources. Doxygen will then generate output that is tailored for VHDL.
# The default value is: NO.
OPTIMIZE_OUTPUT_VHDL = NO
# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
# sources only. Doxygen will then generate output that is more tailored for that
# language. For instance, namespaces will be presented as modules, types will be
# separated into more groups, etc.
# The default value is: NO.
OPTIMIZE_OUTPUT_SLICE = NO
# Doxygen selects the parser to use depending on the extension of the files it
# parses. With this tag you can assign which parser to use for a given
# extension. Doxygen has a built-in mapping, but you can override or extend it
# using this tag. The format is ext=language, where ext is a file extension, and
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice,
# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
# tries to guess whether the code is fixed or free formatted code, this is the
# default for Fortran type files). For instance to make doxygen treat .inc files
# as Fortran files (default is PHP), and .f files as C (default is Fortran),
# use: inc=Fortran f=C.
#
# Note: For files without extension you can use no_extension as a placeholder.
#
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen. When specifying no_extension you should add
# * to the FILE_PATTERNS.
#
# Note see also the list of default file extension mappings.
EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
# documentation. See https://daringfireball.net/projects/markdown/ for details.
# The output of markdown processing is further processed by doxygen, so you can
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
# case of backward compatibilities issues.
# The default value is: YES.
MARKDOWN_SUPPORT = YES
# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
# to that level are automatically included in the table of contents, even if
# they do not have an id attribute.
# Note: This feature currently applies only to Markdown headings.
# Minimum value: 0, maximum value: 99, default value: 6.
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
TOC_INCLUDE_HEADINGS = 0
# The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to
# generate identifiers for the Markdown headings. Note: Every identifier is
# unique.
# Possible values are: DOXYGEN use a fixed 'autotoc_md' string followed by a
# sequence number starting at 0 and GITHUB use the lower case version of title
# with any whitespace replaced by '-' and punctuation characters removed.
# The default value is: DOXYGEN.
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
MARKDOWN_ID_STYLE = DOXYGEN
# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
# be prevented in individual cases by putting a % sign in front of the word or
# globally by setting AUTOLINK_SUPPORT to NO.
# The default value is: YES.
AUTOLINK_SUPPORT = YES
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
# to include (a tag file for) the STL sources as input, then you should set this
# tag to YES in order to let doxygen match functions declarations and
# definitions whose arguments contain STL classes (e.g. func(std::string);
# versus func(std::string) {}). This also makes the inheritance and
# collaboration diagrams that involve STL classes more complete and accurate.
# The default value is: NO.
BUILTIN_STL_SUPPORT = NO
# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
# The default value is: NO.
CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
# https://www.riverbankcomputing.com/software) sources only. Doxygen will parse
# them like normal C++ but will assume all classes use public instead of private
# inheritance when no explicit protection keyword is present.
# The default value is: NO.
SIP_SUPPORT = NO
# For Microsoft's IDL there are propget and propput attributes to indicate
# getter and setter methods for a property. Setting this option to YES will make
# doxygen to replace the get and set methods by a property in the documentation.
# This will only work if the methods are indeed getting or setting a simple
# type. If this is not the case, or you want to show the methods anyway, you
# should set this option to NO.
# The default value is: YES.
IDL_PROPERTY_SUPPORT = YES
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
# tag is set to YES then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
# The default value is: NO.
DISTRIBUTE_GROUP_DOC = NO
# If one adds a struct or class to a group and this option is enabled, then also
# any nested class or struct is added to the same group. By default this option
# is disabled and one has to add nested compounds explicitly via \ingroup.
# The default value is: NO.
GROUP_NESTED_COMPOUNDS = NO
# Set the SUBGROUPING tag to YES to allow class member groups of the same type
# (for instance a group of public functions) to be put as a subgroup of that
# type (e.g. under the Public Functions section). Set it to NO to prevent
# subgrouping. Alternatively, this can be done per class using the
# \nosubgrouping command.
# The default value is: YES.
SUBGROUPING = YES
# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
# are shown inside the group in which they are included (e.g. using \ingroup)
# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
# and RTF).
#
# Note that this feature does not work in combination with
# SEPARATE_MEMBER_PAGES.
# The default value is: NO.
INLINE_GROUPED_CLASSES = NO
# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
# with only public data fields or simple typedef fields will be shown inline in
# the documentation of the scope in which they are defined (i.e. file,
# namespace, or group documentation), provided this scope is documented. If set
# to NO, structs, classes, and unions are shown on a separate page (for HTML and
# Man pages) or section (for LaTeX and RTF).
# The default value is: NO.
INLINE_SIMPLE_STRUCTS = YES
# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
# enum is documented as struct, union, or enum with the name of the typedef. So
# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
# with name TypeT. When disabled the typedef will appear as a member of a file,
# namespace, or class. And the struct will be named TypeS. This can typically be
# useful for C code in case the coding convention dictates that all compound
# types are typedef'ed and only the typedef is referenced, never the tag name.
# The default value is: NO.
TYPEDEF_HIDES_STRUCT = YES
# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
# cache is used to resolve symbols given their name and scope. Since this can be
# an expensive process and often the same symbol appears multiple times in the
# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
# doxygen will become slower. If the cache is too large, memory is wasted. The
# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
# symbols. At the end of a run doxygen will report the cache usage and suggest
# the optimal cache size from a speed point of view.
# Minimum value: 0, maximum value: 9, default value: 0.
LOOKUP_CACHE_SIZE = 0
# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use
# during processing. When set to 0 doxygen will based this on the number of
# cores available in the system. You can set it explicitly to a value larger
# than 0 to get more control over the balance between CPU load and processing
# speed. At this moment only the input processing can be done using multiple
# threads. Since this is still an experimental feature the default is set to 1,
# which effectively disables parallel processing. Please report any issues you
# encounter. Generating dot graphs in parallel is controlled by the
# DOT_NUM_THREADS setting.
# Minimum value: 0, maximum value: 32, default value: 1.
NUM_PROC_THREADS = 1
# If the TIMESTAMP tag is set different from NO then each generated page will
# contain the date or date and time when the page was generated. Setting this to
# NO can help when comparing the output of multiple runs.
# Possible values are: YES, NO, DATETIME and DATE.
# The default value is: NO.
TIMESTAMP = NO
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
# documentation are documented, even if no documentation was available. Private
# class members and static file members will be hidden unless the
# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
# Note: This will also disable the warnings about undocumented members that are
# normally produced when WARNINGS is set to YES.
# The default value is: NO.
EXTRACT_ALL = YES
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation.
# The default value is: NO.
EXTRACT_PRIVATE = NO
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
# methods of a class will be included in the documentation.
# The default value is: NO.
EXTRACT_PRIV_VIRTUAL = NO
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
# scope will be included in the documentation.
# The default value is: NO.
EXTRACT_PACKAGE = NO
# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
# included in the documentation.
# The default value is: NO.
EXTRACT_STATIC = NO
# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
# locally in source files will be included in the documentation. If set to NO,
# only classes defined in header files are included. Does not have any effect
# for Java sources.
# The default value is: YES.
EXTRACT_LOCAL_CLASSES = YES
# This flag is only useful for Objective-C code. If set to YES, local methods,
# which are defined in the implementation section but not in the interface are
# included in the documentation. If set to NO, only methods in the interface are
# included.
# The default value is: NO.
EXTRACT_LOCAL_METHODS = NO
# If this flag is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called
# 'anonymous_namespace{file}', where file will be replaced with the base name of
# the file that contains the anonymous namespace. By default anonymous namespace
# are hidden.
# The default value is: NO.
EXTRACT_ANON_NSPACES = NO
# If this flag is set to YES, the name of an unnamed parameter in a declaration
# will be determined by the corresponding definition. By default unnamed
# parameters remain unnamed in the output.
# The default value is: YES.
RESOLVE_UNNAMED_PARAMS = YES
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
# undocumented members inside documented classes or files. If set to NO these
# members will be included in the various overviews, but no documentation
# section is generated. This option has no effect if EXTRACT_ALL is enabled.
# The default value is: NO.
HIDE_UNDOC_MEMBERS = NO
# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy. If set
# to NO, these classes will be included in the various overviews. This option
# will also hide undocumented C++ concepts if enabled. This option has no effect
# if EXTRACT_ALL is enabled.
# The default value is: NO.
HIDE_UNDOC_CLASSES = NO
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
# declarations. If set to NO, these declarations will be included in the
# documentation.
# The default value is: NO.
HIDE_FRIEND_COMPOUNDS = NO
# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
# documentation blocks found inside the body of a function. If set to NO, these
# blocks will be appended to the function's detailed documentation block.
# The default value is: NO.
HIDE_IN_BODY_DOCS = NO
# The INTERNAL_DOCS tag determines if documentation that is typed after a
# \internal command is included. If the tag is set to NO then the documentation
# will be excluded. Set it to YES to include the internal documentation.
# The default value is: NO.
INTERNAL_DOCS = NO
# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
# able to match the capabilities of the underlying filesystem. In case the
# filesystem is case sensitive (i.e. it supports files in the same directory
# whose names only differ in casing), the option must be set to YES to properly
# deal with such files in case they appear in the input. For filesystems that
# are not case sensitive the option should be set to NO to properly deal with
# output files written for symbols that only differ in casing, such as for two
# classes, one named CLASS and the other named Class, and to also support
# references to files without having to specify the exact matching casing. On
# Windows (including Cygwin) and MacOS, users should typically set this option
# to NO, whereas on Linux or other Unix flavors it should typically be set to
# YES.
# Possible values are: SYSTEM, NO and YES.
# The default value is: SYSTEM.
CASE_SENSE_NAMES = NO
# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
# their full class and namespace scopes in the documentation. If set to YES, the
# scope will be hidden.
# The default value is: NO.
HIDE_SCOPE_NAMES = NO
# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
# append additional text to a page's title, such as Class Reference. If set to
# YES the compound reference will be hidden.
# The default value is: NO.
HIDE_COMPOUND_REFERENCE= NO
# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class
# will show which file needs to be included to use the class.
# The default value is: YES.
SHOW_HEADERFILE = YES
# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
# the files that are included by a file in the documentation of that file.
# The default value is: YES.
SHOW_INCLUDE_FILES = YES
# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
# grouped member an include statement to the documentation, telling the reader
# which file to include in order to use the member.
# The default value is: NO.
SHOW_GROUPED_MEMB_INC = NO
# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
# files with double quotes in the documentation rather than with sharp brackets.
# The default value is: NO.
FORCE_LOCAL_INCLUDES = NO
# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
# documentation for inline members.
# The default value is: YES.
INLINE_INFO = YES
# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
# (detailed) documentation of file and class members alphabetically by member
# name. If set to NO, the members will appear in declaration order.
# The default value is: YES.
SORT_MEMBER_DOCS = YES
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
# descriptions of file, namespace and class members alphabetically by member
# name. If set to NO, the members will appear in declaration order. Note that
# this will also influence the order of the classes in the class list.
# The default value is: NO.
SORT_BRIEF_DOCS = NO
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
# (brief and detailed) documentation of class members so that constructors and
# destructors are listed first. If set to NO the constructors will appear in the
# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
# member documentation.
# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
# detailed member documentation.
# The default value is: NO.
SORT_MEMBERS_CTORS_1ST = NO
# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
# of group names into alphabetical order. If set to NO the group names will
# appear in their defined order.
# The default value is: NO.
SORT_GROUP_NAMES = NO
# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
# fully-qualified names, including namespaces. If set to NO, the class list will
# be sorted only by class name, not including the namespace part.
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
# Note: This option applies only to the class list, not to the alphabetical
# list.
# The default value is: NO.
SORT_BY_SCOPE_NAME = NO
# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
# type resolution of all parameters of a function it will reject a match between
# the prototype and the implementation of a member function even if there is
# only one candidate or it is obvious which candidate to choose by doing a
# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
# accept a match between prototype and implementation in such cases.
# The default value is: NO.
STRICT_PROTO_MATCHING = NO
# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
# list. This list is created by putting \todo commands in the documentation.
# The default value is: YES.
GENERATE_TODOLIST = YES
# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
# list. This list is created by putting \test commands in the documentation.
# The default value is: YES.
GENERATE_TESTLIST = YES
# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
# list. This list is created by putting \bug commands in the documentation.
# The default value is: YES.
GENERATE_BUGLIST = YES
# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
# the deprecated list. This list is created by putting \deprecated commands in
# the documentation.
# The default value is: YES.
GENERATE_DEPRECATEDLIST= YES
# The ENABLED_SECTIONS tag can be used to enable conditional documentation
# sections, marked by \if <section_label> ... \endif and \cond <section_label>
# ... \endcond blocks.
ENABLED_SECTIONS =
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
# initial value of a variable or macro / define can have for it to appear in the
# documentation. If the initializer consists of more lines than specified here
# it will be hidden. Use a value of 0 to hide initializers completely. The
# appearance of the value of individual variables and macros / defines can be
# controlled using \showinitializer or \hideinitializer command in the
# documentation regardless of this setting.
# Minimum value: 0, maximum value: 10000, default value: 30.
MAX_INITIALIZER_LINES = 0
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
# the bottom of the documentation of classes and structs. If set to YES, the
# list will mention the files that were used to generate the documentation.
# The default value is: YES.
SHOW_USED_FILES = NO
# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
# will remove the Files entry from the Quick Index and from the Folder Tree View
# (if specified).
# The default value is: YES.
SHOW_FILES = NO
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
# page. This will remove the Namespaces entry from the Quick Index and from the
# Folder Tree View (if specified).
# The default value is: YES.
SHOW_NAMESPACES = YES
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
# doxygen should invoke to get the current version for each file (typically from
# the version control system). Doxygen will invoke the program by executing (via
# popen()) the command command input-file, where command is the value of the
# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
FILE_VERSION_FILTER =
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
# by doxygen. The layout file controls the global structure of the generated
# output files in an output format independent way. To create the layout file
# that represents doxygen's defaults, run doxygen with the -l option. You can
# optionally specify a file name after the option, if omitted DoxygenLayout.xml
# will be used as the name of the layout file. See also section "Changing the
# layout of pages" for information.
#
# Note that if you run doxygen from a directory containing a file called
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
LAYOUT_FILE =
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
# extension is automatically appended if omitted. This requires the bibtex tool
# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
# For LaTeX the style of the bibliography can be controlled using
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
# search path. See also \cite for info how to create references.
CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
# The QUIET tag can be used to turn on/off the messages that are generated to
# standard output by doxygen. If QUIET is set to YES this implies that the
# messages are off.
# The default value is: NO.
QUIET = NO
# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
# this implies that the warnings are on.
#
# Tip: Turn warnings on while writing the documentation.
# The default value is: YES.
WARNINGS = YES
# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
# will automatically be disabled.
# The default value is: YES.
WARN_IF_UNDOCUMENTED = YES
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
# potential errors in the documentation, such as documenting some parameters in
# a documented function twice, or documenting parameters that don't exist or
# using markup commands wrongly.
# The default value is: YES.
WARN_IF_DOC_ERROR = YES
# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete
# function parameter documentation. If set to NO, doxygen will accept that some
# parameters have no documentation without warning.
# The default value is: YES.
WARN_IF_INCOMPLETE_DOC = YES
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
# are documented, but have no documentation for their parameters or return
# value. If set to NO, doxygen will only warn about wrong parameter
# documentation, but not about the absence of documentation. If EXTRACT_ALL is
# set to YES then this flag will automatically be disabled. See also
# WARN_IF_INCOMPLETE_DOC
# The default value is: NO.
WARN_NO_PARAMDOC = NO
# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about
# undocumented enumeration values. If set to NO, doxygen will accept
# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag
# will automatically be disabled.
# The default value is: NO.
WARN_IF_UNDOC_ENUM_VAL = NO
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
# at the end of the doxygen process doxygen will return with a non-zero status.
# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then doxygen behaves
# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined doxygen will not
# write the warning messages in between other messages but write them at the end
# of a run, in case a WARN_LOGFILE is defined the warning messages will be
# besides being in the defined file also be shown at the end of a run, unless
# the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case
# the behavior will remain as with the setting FAIL_ON_WARNINGS.
# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT.
# The default value is: NO.
WARN_AS_ERROR = NO
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
# can produce. The string should contain the $file, $line, and $text tags, which
# will be replaced by the file and line number from which the warning originated
# and the warning text. Optionally the format may contain $version, which will
# be replaced by the version of the file (if it could be obtained via
# FILE_VERSION_FILTER)
# See also: WARN_LINE_FORMAT
# The default value is: $file:$line: $text.
WARN_FORMAT = "$file:$line: $text"
# In the $text part of the WARN_FORMAT command it is possible that a reference
# to a more specific place is given. To make it easier to jump to this place
# (outside of doxygen) the user can define a custom "cut" / "paste" string.
# Example:
# WARN_LINE_FORMAT = "'vi $file +$line'"
# See also: WARN_FORMAT
# The default value is: at line $line of file $file.
WARN_LINE_FORMAT = "at line $line of file $file"
# The WARN_LOGFILE tag can be used to specify a file to which warning and error
# messages should be written. If left blank the output is written to standard
# error (stderr). In case the file specified cannot be opened for writing the
# warning and error messages are written to standard error. When as file - is
# specified the warning and error messages are written to standard output
# (stdout).
WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
# The INPUT tag is used to specify the files and/or directories that contain
# documented source files. You may enter file names like myfile.cpp or
# directories like /usr/src/myproject. Separate the files or directories with
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT = mimalloc-doc.h
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
# documentation (see:
# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
# See also: INPUT_FILE_ENCODING
# The default value is: UTF-8.
INPUT_ENCODING = UTF-8
# This tag can be used to specify the character encoding of the source files
# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify
# character encoding on a per file pattern basis. Doxygen will compare the file
# name with each pattern and apply the encoding instead of the default
# INPUT_ENCODING) if there is a match. The character encodings are a list of the
# form: pattern=encoding (like *.php=ISO-8859-1).
# See also: INPUT_ENCODING for further information on supported encodings.
INPUT_FILE_ENCODING =
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
# *.h) to filter out the source-files in the directories.
#
# Note that for custom extensions or not directly supported extensions you also
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# read by doxygen.
#
# Note the list of default checked file patterns might differ from the list of
# default file extension mappings.
#
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cxxm,
# *.cpp, *.cppm, *.ccm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl,
# *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.ixx, *.l, *.cs, *.d,
# *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to
# be provided as doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
# *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.idl \
*.ddl \
*.odl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.cs \
*.d \
*.php \
*.php4 \
*.php5 \
*.phtml \
*.inc \
*.m \
*.markdown \
*.md \
*.mm \
*.dox \
*.py \
*.pyw \
*.f90 \
*.f95 \
*.f03 \
*.f08 \
*.f \
*.for \
*.tcl \
*.vhd \
*.vhdl \
*.ucf \
*.qsf
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
# The default value is: NO.
RECURSIVE = NO
# The EXCLUDE tag can be used to specify files and/or directories that should be
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
#
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE =
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
# from the input.
# The default value is: NO.
EXCLUDE_SYMLINKS = NO
# If the value of the INPUT tag contains directories, you can use the
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
# certain files from those directories.
#
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*
EXCLUDE_PATTERNS =
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
# output. The symbol name can be a fully qualified name, a word, or if the
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# ANamespace::AClass, ANamespace::*Test
EXCLUDE_SYMBOLS =
# The EXAMPLE_PATH tag can be used to specify one or more files or directories
# that contain example code fragments that are included (see the \include
# command).
EXAMPLE_PATH =
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
# *.h) to filter out the source-files in the directories. If left blank all
# files are included.
EXAMPLE_PATTERNS = *
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
# searched for input files to be used with the \include or \dontinclude commands
# irrespective of the value of the RECURSIVE tag.
# The default value is: NO.
EXAMPLE_RECURSIVE = NO
# The IMAGE_PATH tag can be used to specify one or more files or directories
# that contain images that are to be included in the documentation (see the
# \image command).
IMAGE_PATH =
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
# by executing (via popen()) the command:
#
# <filter> <input-file>
#
# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
# name of an input file. Doxygen will then use the output that the filter
# program writes to standard output. If FILTER_PATTERNS is specified, this tag
# will be ignored.
#
# Note that the filter must not add or remove lines; it is applied before the
# code is scanned, but not when the output code is generated. If lines are added
# or removed, the anchors will not be placed correctly.
#
# Note that doxygen will use the data processed and written to standard output
# for further processing, therefore nothing else, like debug statements or used
# commands (so in case of a Windows batch file always use @echo OFF), should be
# written to standard output.
#
# Note that for custom extensions or not directly supported extensions you also
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
INPUT_FILTER =
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
# basis. Doxygen will compare the file name with each pattern and apply the
# filter if there is a match. The filters are a list of the form: pattern=filter
# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
# patterns match the file name, INPUT_FILTER is applied.
#
# Note that for custom extensions or not directly supported extensions you also
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
FILTER_PATTERNS =
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
# INPUT_FILTER) will also be used to filter the input files that are used for
# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
# The default value is: NO.
FILTER_SOURCE_FILES = NO
# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
# it is also possible to disable source filtering for a specific pattern using
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
FILTER_SOURCE_PATTERNS =
# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
# is part of the input, its contents will be placed on the main page
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.
USE_MDFILE_AS_MAINPAGE =
# The Fortran standard specifies that for fixed formatted Fortran code all
# characters from position 72 are to be considered as comment. A common
# extension is to allow longer lines before the automatic comment starts. The
# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can
# be processed before the automatic comment starts.
# Minimum value: 7, maximum value: 10000, default value: 72.
FORTRAN_COMMENT_AFTER = 72
#---------------------------------------------------------------------------
# Configuration options related to source browsing
#---------------------------------------------------------------------------
# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
# generated. Documented entities will be cross-referenced with these sources.
#
# Note: To get rid of all source code in the generated output, make sure that
# also VERBATIM_HEADERS is set to NO.
# The default value is: NO.
SOURCE_BROWSER = NO
# Setting the INLINE_SOURCES tag to YES will include the body of functions,
# multi-line macros, enums or list initialized variables directly into the
# documentation.
# The default value is: NO.
INLINE_SOURCES = NO
# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
# special comment blocks from generated source code fragments. Normal C, C++ and
# Fortran comments will always remain visible.
# The default value is: YES.
STRIP_CODE_COMMENTS = YES
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
# entity all documented functions referencing it will be listed.
# The default value is: NO.
REFERENCED_BY_RELATION = NO
# If the REFERENCES_RELATION tag is set to YES then for each documented function
# all documented entities called/used by that function will be listed.
# The default value is: NO.
REFERENCES_RELATION = NO
# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
# to YES then the hyperlinks from functions in REFERENCES_RELATION and
# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
# link to the documentation.
# The default value is: YES.
REFERENCES_LINK_SOURCE = YES
# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
# source code will show a tooltip with additional information such as prototype,
# brief description and links to the definition and documentation. Since this
# will make the HTML file larger and loading of large files a bit slower, you
# can opt to disable this feature.
# The default value is: YES.
# This tag requires that the tag SOURCE_BROWSER is set to YES.
SOURCE_TOOLTIPS = YES
# If the USE_HTAGS tag is set to YES then the references to source code will
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
# source browser. The htags tool is part of GNU's global source tagging system
# (see https://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
# - Install the latest version of global
# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
# - Make sure the INPUT points to the root of the source tree
# - Run doxygen as normal
#
# Doxygen will invoke htags (and that will in turn invoke gtags), so these
# tools must be available from the command line (i.e. in the search path).
#
# The result: instead of the source browser generated by doxygen, the links to
# source code will now point to the output of htags.
# The default value is: NO.
# This tag requires that the tag SOURCE_BROWSER is set to YES.
USE_HTAGS = NO
# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
# verbatim copy of the header file for each class for which an include is
# specified. Set to NO to disable this.
# See also: Section \class.
# The default value is: YES.
VERBATIM_HEADERS = YES
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
# clang parser (see:
# http://clang.llvm.org/) for more accurate parsing at the cost of reduced
# performance. This can be particularly helpful with template rich C++ code for
# which doxygen's built-in parser lacks the necessary type information.
# Note: The availability of this option depends on whether or not doxygen was
# generated with the -Duse_libclang=ON option for CMake.
# The default value is: NO.
CLANG_ASSISTED_PARSING = NO
# If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS
# tag is set to YES then doxygen will add the directory of each input to the
# include path.
# The default value is: YES.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
CLANG_ADD_INC_PATHS = YES
# If clang assisted parsing is enabled you can provide the compiler with command
# line options that you would normally use when invoking the compiler. Note that
# the include paths will already be set by doxygen for the files and directories
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
CLANG_OPTIONS =
# If clang assisted parsing is enabled you can provide the clang parser with the
# path to the directory containing a file called compile_commands.json. This
# file is the compilation database (see:
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the
# options used when the source files were built. This is equivalent to
# specifying the -p option to a clang tool, such as clang-check. These options
# will then be passed to the parser. Any options specified with CLANG_OPTIONS
# will be added as well.
# Note: The availability of this option depends on whether or not doxygen was
# generated with the -Duse_libclang=ON option for CMake.
CLANG_DATABASE_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
# compounds will be generated. Enable this if the project contains a lot of
# classes, structs, unions or interfaces.
# The default value is: YES.
ALPHABETICAL_INDEX = YES
# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes)
# that should be ignored while generating the index headers. The IGNORE_PREFIX
# tag works for classes, function and member names. The entity will be placed in
# the alphabetical list under the first letter of the entity name that remains
# after removing the prefix.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
#---------------------------------------------------------------------------
# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
# The default value is: YES.
GENERATE_HTML = YES
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
# it.
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_OUTPUT = docs
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).
# The default value is: .html.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FILE_EXTENSION = .html
# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
# each generated HTML page. If the tag is left blank doxygen will generate a
# standard header.
#
# To get valid HTML the header file that includes any scripts and style sheets
# that doxygen needs, which is dependent on the configuration options used (e.g.
# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
# default header using
# doxygen -w html new_header.html new_footer.html new_stylesheet.css
# YourConfigFile
# and then modify the file new_header.html. See also section "Doxygen usage"
# for information on how to generate the default header that doxygen normally
# uses.
# Note: The header is subject to change so you typically have to regenerate the
# default header when upgrading to a newer version of doxygen. For a description
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER =
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
# footer. See HTML_HEADER for more information on how to generate a default
# footer and what special commands can be used inside the footer. See also
# section "Doxygen usage" for information on how to generate the default footer
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FOOTER =
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
# sheet that is used by each HTML page. It can be used to fine-tune the look of
# the HTML output. If left blank doxygen will generate a default style sheet.
# See also section "Doxygen usage" for information on how to generate the style
# sheet that doxygen normally uses.
# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
# it is more robust and this tag (HTML_STYLESHEET) will in the future become
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_STYLESHEET =
# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
# cascading style sheets that are included after the standard style sheets
# created by doxygen. Using this option one can overrule certain style aspects.
# This is preferred over using HTML_STYLESHEET since it does not replace the
# standard style sheet and is therefore more robust against future updates.
# Doxygen will copy the style sheet files to the output directory.
# Note: The order of the extra style sheet files is of importance (e.g. the last
# style sheet in the list overrules the setting of the previous ones in the
# list).
# Note: Since the styling of scrollbars can currently not be overruled in
# Webkit/Chromium, the styling will be left out of the default doxygen.css if
# one or more extra stylesheets have been specified. So if scrollbar
# customization is desired it has to be added explicitly. For an example see the
# documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET = mimalloc-doxygen.css
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
# that these files will be copied to the base HTML output directory. Use the
# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
# files will be copied as-is; there are no commands or markers available.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_FILES =
# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
# should be rendered with a dark or light theme.
# Possible values are: LIGHT always generates light mode output, DARK always
# generates dark mode output, AUTO_LIGHT automatically sets the mode according
# to the user preference, uses light mode if no preference is set (the default),
# AUTO_DARK automatically sets the mode according to the user preference, uses
# dark mode if no preference is set and TOGGLE allows a user to switch between
# light and dark mode via a button.
# The default value is: AUTO_LIGHT.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE = LIGHT
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the style sheet and background images according to
# this color. Hue is specified as an angle on a color-wheel, see
# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
# purple, and 360 is red again.
# Minimum value: 0, maximum value: 359, default value: 220.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_HUE = 189
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
# in the HTML output. For a value of 0 the output will use gray-scales only. A
# value of 255 will produce the most vivid colors.
# Minimum value: 0, maximum value: 255, default value: 100.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_SAT = 12
# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
# luminance component of the colors in the HTML output. Values below 100
# gradually make the output lighter, whereas values above 100 make the output
# darker. The value divided by 100 is the actual gamma applied, so 80 represents
# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
# change the gamma.
# Minimum value: 40, maximum value: 240, default value: 80.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_GAMMA = 240
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
# documentation will contain a main index with vertical navigation menus that
# are dynamically created via JavaScript. If disabled, the navigation index will
# consists of multiple levels of tabs that are statically embedded in every HTML
# page. Disable this option to support browsers that do not have JavaScript,
# like the Qt help browser.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_DYNAMIC_MENUS = NO
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_DYNAMIC_SECTIONS = NO
# If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be
# dynamically folded and expanded in the generated HTML source code.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_CODE_FOLDING = YES
# If the HTML_COPY_CLIPBOARD tag is set to YES then doxygen will show an icon in
# the top right corner of code and text fragments that allows the user to copy
# its content to the clipboard. Note this only works if supported by the browser
# and the web page is served via a secure context (see:
# https://www.w3.org/TR/secure-contexts/), i.e. using the https: or file:
# protocol.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COPY_CLIPBOARD = YES
# Doxygen stores a couple of settings persistently in the browser (via e.g.
# cookies). By default these settings apply to all HTML pages generated by
# doxygen across all projects. The HTML_PROJECT_COOKIE tag can be used to store
# the settings under a project specific key, such that the user preferences will
# be stored separately.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_PROJECT_COOKIE =
# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
# shown in the various tree structured indices initially; the user can expand
# and collapse entries dynamically later on. Doxygen will expand the tree to
# such a level that at most the specified number of entries are visible (unless
# a fully collapsed tree already exceeds this amount). So setting the number of
# entries 1 will produce a full collapsed tree by default. 0 is a special value
# representing an infinite number of entries and will result in a full expanded
# tree by default.
# Minimum value: 0, maximum value: 9999, default value: 100.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_INDEX_NUM_ENTRIES = 100
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
# generated that can be used as input for Apple's Xcode 3 integrated development
# environment (see:
# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
# create a documentation set, doxygen will generate a Makefile in the HTML
# output directory. Running make will produce the docset in that directory and
# running make install will install the docset in
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
# genXcode/_index.html for more information.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_DOCSET = NO
# This tag determines the name of the docset feed. A documentation feed provides
# an umbrella under which multiple documentation sets from a single provider
# (such as a company or product suite) can be grouped.
# The default value is: Doxygen generated docs.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_FEEDNAME = "Doxygen generated docs"
# This tag determines the URL of the docset feed. A documentation feed provides
# an umbrella under which multiple documentation sets from a single provider
# (such as a company or product suite) can be grouped.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_FEEDURL =
# This tag specifies a string that should uniquely identify the documentation
# set bundle. This should be a reverse domain-name style string, e.g.
# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_BUNDLE_ID = org.doxygen.Project
# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
# the documentation publisher. This should be a reverse domain-name style
# string, e.g. com.mycompany.MyDocSet.documentation.
# The default value is: org.doxygen.Publisher.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
# The default value is: Publisher.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_PUBLISHER_NAME = Publisher
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
# on Windows. In the beginning of 2021 Microsoft took the original page, with
# a.o. the download links, offline the HTML help workshop was already many years
# in maintenance mode). You can download the HTML help workshop from the web
# archives at Installation executable (see:
# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo
# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe).
#
# The HTML Help Workshop contains a compiler that can convert all HTML output
# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
# files are now used as the Windows 98 help format, and will replace the old
# Windows help format (.hlp) on all Windows platforms in the future. Compressed
# HTML files also contain an index, a table of contents, and you can search for
# words in the documentation. The HTML workshop also contains a viewer for
# compressed HTML files.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_HTMLHELP = NO
# The CHM_FILE tag can be used to specify the file name of the resulting .chm
# file. You can add a path in front of the file if the result should not be
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_FILE =
# The HHC_LOCATION tag can be used to specify the location (absolute path
# including file name) of the HTML help compiler (hhc.exe). If non-empty,
# doxygen will try to run the HTML help compiler on the generated index.hhp.
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the main .chm file (NO).
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
GENERATE_CHI = NO
# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_INDEX_ENCODING =
# The BINARY_TOC flag controls whether a binary table of contents is generated
# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
# enables the Previous and Next buttons.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
BINARY_TOC = NO
# The TOC_EXPAND flag can be set to YES to add extra items for group members to
# the table of contents of the HTML help documentation and to the tree view.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
TOC_EXPAND = NO
# The SITEMAP_URL tag is used to specify the full URL of the place where the
# generated documentation will be placed on the server by the user during the
# deployment of the documentation. The generated sitemap is called sitemap.xml
# and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL
# is specified no sitemap is generated. For information about the sitemap
# protocol see https://www.sitemaps.org
# This tag requires that the tag GENERATE_HTML is set to YES.
SITEMAP_URL =
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
# (.qch) of the generated HTML documentation.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_QHP = NO
# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
# the file name of the resulting .qch file. The path specified is relative to
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
QCH_FILE =
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
# Project output. For more information please see Qt Help Project / Namespace
# (see:
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_NAMESPACE = org.doxygen.Project
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
# Help Project output. For more information please see Qt Help Project / Virtual
# Folders (see:
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_VIRTUAL_FOLDER = doc
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
# filter to add. For more information please see Qt Help Project / Custom
# Filters (see:
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see Qt Help Project / Custom
# Filters (see:
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's filter section matches. Qt Help Project / Filter Attributes (see:
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location (absolute path
# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
# run qhelpgenerator on the generated .qhp file.
# This tag requires that the tag GENERATE_QHP is set to YES.
QHG_LOCATION =
# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
# generated, together with the HTML files, they form an Eclipse help plugin. To
# install this plugin and make it available under the help contents menu in
# Eclipse, the contents of the directory containing the HTML and XML files needs
# to be copied into the plugins directory of eclipse. The name of the directory
# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
# After copying Eclipse needs to be restarted before the help appears.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_ECLIPSEHELP = NO
# A unique identifier for the Eclipse help plugin. When installing the plugin
# the directory name containing the HTML and XML files should also have this
# name. Each documentation set should have its own identifier.
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
ECLIPSE_DOC_ID = org.doxygen.Project
# If you want full control over the layout of the generated HTML pages it might
# be necessary to disable the index and replace it with your own. The
# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
# of each HTML page. A value of NO enables the index and the value YES disables
# it. Since the tabs in the index contain the same information as the navigation
# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
DISABLE_INDEX = YES
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
# structure should be generated to display hierarchical information. If the tag
# value is set to YES, a side panel will be generated containing a tree-like
# index structure (just like the one that is generated for HTML Help). For this
# to work a browser that supports JavaScript, DHTML, CSS and frames is required
# (i.e. any modern browser). Windows users are probably better off using the
# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
# further fine tune the look of the index (see "Fine-tuning the output"). As an
# example, the default style sheet generated by doxygen has an example that
# shows how to put an image at the root of the tree instead of the PROJECT_NAME.
# Since the tree basically has the same information as the tab index, you could
# consider setting DISABLE_INDEX to YES when enabling this option.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_TREEVIEW = YES
# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the
# FULL_SIDEBAR option determines if the side bar is limited to only the treeview
# area (value NO) or if it should extend to the full height of the window (value
# YES). Setting this to YES gives a layout similar to
# https://docs.readthedocs.io with more room for contents, but less room for the
# project logo, title, and description. If either GENERATE_TREEVIEW or
# DISABLE_INDEX is set to NO, this option has no effect.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
FULL_SIDEBAR = NO
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
# doxygen will group on one line in the generated HTML documentation.
#
# Note that a value of 0 will completely suppress the enum values from appearing
# in the overview section.
# Minimum value: 0, maximum value: 20, default value: 4.
# This tag requires that the tag GENERATE_HTML is set to YES.
ENUM_VALUES_PER_LINE = 4
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
# to set the initial width (in pixels) of the frame in which the tree is shown.
# Minimum value: 0, maximum value: 1500, default value: 250.
# This tag requires that the tag GENERATE_HTML is set to YES.
TREEVIEW_WIDTH = 180
# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
# external symbols imported via tag files in a separate window.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
EXT_LINKS_IN_WINDOW = NO
# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email
# addresses.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
OBFUSCATE_EMAILS = YES
# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
# the HTML output. These images will generally look nicer at scaled resolutions.
# Possible values are: png (the default) and svg (looks nicer but requires the
# pdf2svg or inkscape tool).
# The default value is: png.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FORMULA_FORMAT = png
# Use this tag to change the font size of LaTeX formulas included as images in
# the HTML documentation. When you change the font size after a successful
# doxygen run you need to manually remove any form_*.png images from the HTML
# output directory to force them to be regenerated.
# Minimum value: 8, maximum value: 50, default value: 10.
# This tag requires that the tag GENERATE_HTML is set to YES.
FORMULA_FONTSIZE = 10
# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
# to create new LaTeX commands to be used in formulas as building blocks. See
# the section "Including formulas" for details.
FORMULA_MACROFILE =
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
# https://www.mathjax.org) which uses client side JavaScript for the rendering
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
# installed or if you want to formulas look prettier in the HTML output. When
# enabled you may also need to install MathJax separately and configure the path
# to it using the MATHJAX_RELPATH option.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
USE_MATHJAX = NO
# With MATHJAX_VERSION it is possible to specify the MathJax version to be used.
# Note that the different versions of MathJax have different requirements with
# regards to the different settings, so it is possible that also other MathJax
# settings have to be changed when switching between the different MathJax
# versions.
# Possible values are: MathJax_2 and MathJax_3.
# The default value is: MathJax_2.
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_VERSION = MathJax_2
# When MathJax is enabled you can set the default output format to be used for
# the MathJax output. For more details about the output format see MathJax
# version 2 (see:
# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3
# (see:
# http://docs.mathjax.org/en/latest/web/components/output.html).
# Possible values are: HTML-CSS (which is slower, but has the best
# compatibility. This is the name for Mathjax version 2, for MathJax version 3
# this will be translated into chtml), NativeMML (i.e. MathML. Only supported
# for MathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This
# is the name for Mathjax version 3, for MathJax version 2 this will be
# translated into HTML-CSS) and SVG.
# The default value is: HTML-CSS.
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_FORMAT = HTML-CSS
# When MathJax is enabled you need to specify the location relative to the HTML
# output directory using the MATHJAX_RELPATH option. The destination directory
# should contain the MathJax.js script. For instance, if the mathjax directory
# is located at the same level as the HTML output directory, then
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
# Content Delivery Network so you can quickly see the result without installing
# MathJax. However, it is strongly recommended to install a local copy of
# MathJax from https://www.mathjax.org before deployment. The default value is:
# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2
# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
# extension names that should be enabled during MathJax rendering. For example
# for MathJax version 2 (see
# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions):
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# For example for MathJax version 3 (see
# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html):
# MATHJAX_EXTENSIONS = ams
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_EXTENSIONS =
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
# of code that will be used on startup of the MathJax code. See the MathJax site
# (see:
# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_CODEFILE =
# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
# the HTML output. The underlying search engine uses javascript and DHTML and
# should work on any modern browser. Note that when using HTML help
# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
# there is already a search function so this one should typically be disabled.
# For large projects the javascript based search engine can be slow, then
# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
# search using the keyboard; to jump to the search box use <access key> + S
# (what the <access key> is depends on the OS and browser, but it is typically
# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
# key> to jump into the search results window, the results can be navigated
# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
# the search. The filter options can be selected when the cursor is inside the
# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
# to select a filter and <Enter> or <escape> to activate or cancel the filter
# option.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
SEARCHENGINE = YES
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a web server instead of a web client using JavaScript. There
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
# setting. When disabled, doxygen will generate a PHP script for searching and
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
# and searching needs to be provided by external tools. See the section
# "External Indexing and Searching" for details.
# The default value is: NO.
# This tag requires that the tag SEARCHENGINE is set to YES.
SERVER_BASED_SEARCH = NO
# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
# script for searching. Instead the search results are written to an XML file
# which needs to be processed by an external indexer. Doxygen will invoke an
# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
# search results.
#
# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see:
# https://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
# This tag requires that the tag SEARCHENGINE is set to YES.
EXTERNAL_SEARCH = NO
# The SEARCHENGINE_URL should point to a search engine hosted by a web server
# which will return the search results when EXTERNAL_SEARCH is enabled.
#
# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see:
# https://xapian.org/). See the section "External Indexing and Searching" for
# details.
# This tag requires that the tag SEARCHENGINE is set to YES.
SEARCHENGINE_URL =
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
# search data is written to a file for indexing by an external tool. With the
# SEARCHDATA_FILE tag the name of this file can be specified.
# The default file is: searchdata.xml.
# This tag requires that the tag SEARCHENGINE is set to YES.
SEARCHDATA_FILE = searchdata.xml
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
EXTERNAL_SEARCH_ID =
# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
# projects other than the one defined by this configuration file, but that are
# all added to the same external search index. Each project needs to have a
# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
# to a relative location where the documentation can be found. The format is:
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
# The default value is: YES.
GENERATE_LATEX = NO
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
# it.
# The default directory is: latex.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_OUTPUT = latex
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
# invoked.
#
# Note that when not enabling USE_PDFLATEX the default is latex when enabling
# USE_PDFLATEX the default is pdflatex and when in the later case latex is
# chosen this is overwritten by pdflatex. For specific output languages the
# default can have been set differently, this depends on the implementation of
# the output language.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_CMD_NAME = latex
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
# index for LaTeX.
# Note: This tag is used in the Makefile / make.bat.
# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
# (.tex).
# The default file is: makeindex.
# This tag requires that the tag GENERATE_LATEX is set to YES.
MAKEINDEX_CMD_NAME = makeindex
# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
# generate index for LaTeX. In case there is no backslash (\) as first character
# it will be automatically added in the LaTeX code.
# Note: This tag is used in the generated output file (.tex).
# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
# The default value is: makeindex.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_MAKEINDEX_CMD = \makeindex
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
# documents. This may be useful for small projects and may help to save some
# trees in general.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.
COMPACT_LATEX = NO
# The PAPER_TYPE tag can be used to set the paper type that is used by the
# printer.
# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
# 14 inches) and executive (7.25 x 10.5 inches).
# The default value is: a4.
# This tag requires that the tag GENERATE_LATEX is set to YES.
PAPER_TYPE = a4
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
# that should be included in the LaTeX output. The package can be specified just
# by its name or with the correct syntax as to be used with the LaTeX
# \usepackage command. To get the times font for instance you can specify :
# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
# To use the option intlimits with the amsmath package you can specify:
# EXTRA_PACKAGES=[intlimits]{amsmath}
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
EXTRA_PACKAGES =
# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for
# the generated LaTeX document. The header should contain everything until the
# first chapter. If it is left blank doxygen will generate a standard header. It
# is highly recommended to start with a default header using
# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty
# and then modify the file new_header.tex. See also section "Doxygen usage" for
# information on how to generate the default header that doxygen normally uses.
#
# Note: Only use a user-defined header if you know what you are doing!
# Note: The header is subject to change so you typically have to regenerate the
# default header when upgrading to a newer version of doxygen. The following
# commands have a special meaning inside the header (and footer): For a
# description of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_HEADER =
# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for
# the generated LaTeX document. The footer should contain everything after the
# last chapter. If it is left blank doxygen will generate a standard footer. See
# LATEX_HEADER for more information on how to generate a default footer and what
# special commands can be used inside the footer. See also section "Doxygen
# usage" for information on how to generate the default footer that doxygen
# normally uses. Note: Only use a user-defined footer if you know what you are
# doing!
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_FOOTER =
# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
# LaTeX style sheets that are included after the standard style sheets created
# by doxygen. Using this option one can overrule certain style aspects. Doxygen
# will copy the style sheet files to the output directory.
# Note: The order of the extra style sheet files is of importance (e.g. the last
# style sheet in the list overrules the setting of the previous ones in the
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_EXTRA_STYLESHEET =
# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the LATEX_OUTPUT output
# directory. Note that the files will be copied as-is; there are no commands or
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_EXTRA_FILES =
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
# contain links (just like the HTML output) instead of page references. This
# makes the output suitable for online browsing using a PDF viewer.
# The default value is: YES.
# This tag requires that the tag GENERATE_LATEX is set to YES.
PDF_HYPERLINKS = YES
# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
# files. Set this option to YES, to get a higher quality PDF documentation.
#
# See also section LATEX_CMD_NAME for selecting the engine.
# The default value is: YES.
# This tag requires that the tag GENERATE_LATEX is set to YES.
USE_PDFLATEX = YES
# The LATEX_BATCHMODE tag signals the behavior of LaTeX in case of an error.
# Possible values are: NO same as ERROR_STOP, YES same as BATCH, BATCH In batch
# mode nothing is printed on the terminal, errors are scrolled as if <return> is
# hit at every error; missing files that TeX tries to input or request from
# keyboard input (\read on a not open input stream) cause the job to abort,
# NON_STOP In nonstop mode the diagnostic message will appear on the terminal,
# but there is no possibility of user interaction just like in batch mode,
# SCROLL In scroll mode, TeX will stop only for missing files to input or if
# keyboard input is necessary and ERROR_STOP In errorstop mode, TeX will stop at
# each error, asking for user intervention.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_BATCHMODE = NO
# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
# index chapters (such as File Index, Compound Index, etc.) in the output.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_HIDE_INDICES = NO
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. See
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
# The default value is: plain.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_BIB_STYLE = plain
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
# path from which the emoji images will be read. If a relative path is entered,
# it will be relative to the LATEX_OUTPUT directory. If left blank the
# LATEX_OUTPUT directory will be used.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_EMOJI_DIRECTORY =
#---------------------------------------------------------------------------
# Configuration options related to the RTF output
#---------------------------------------------------------------------------
# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
# RTF output is optimized for Word 97 and may not look too pretty with other RTF
# readers/editors.
# The default value is: NO.
GENERATE_RTF = NO
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
# it.
# The default directory is: rtf.
# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_OUTPUT = rtf
# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
# documents. This may be useful for small projects and may help to save some
# trees in general.
# The default value is: NO.
# This tag requires that the tag GENERATE_RTF is set to YES.
COMPACT_RTF = NO
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
# contain hyperlink fields. The RTF file will contain links (just like the HTML
# output) instead of page references. This makes the output suitable for online
# browsing using Word or some other Word compatible readers that support those
# fields.
#
# Note: WordPad (write) and others do not support links.
# The default value is: NO.
# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_HYPERLINKS = NO
# Load stylesheet definitions from file. Syntax is similar to doxygen's
# configuration file, i.e. a series of assignments. You only have to provide
# replacements, missing definitions are set to their default value.
#
# See also section "Doxygen usage" for information on how to generate the
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's configuration file. A template extensions file can be
# generated using doxygen -e rtf extensionFile.
# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_EXTENSIONS_FILE =
# The RTF_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the RTF_OUTPUT output directory.
# Note that the files will be copied as-is; there are no commands or markers
# available.
# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_EXTRA_FILES =
#---------------------------------------------------------------------------
# Configuration options related to the man page output
#---------------------------------------------------------------------------
# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
# classes and files.
# The default value is: NO.
GENERATE_MAN = NO
# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
# it. A directory man3 will be created inside the directory specified by
# MAN_OUTPUT.
# The default directory is: man.
# This tag requires that the tag GENERATE_MAN is set to YES.
MAN_OUTPUT = man
# The MAN_EXTENSION tag determines the extension that is added to the generated
# man pages. In case the manual section does not start with a number, the number
# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
# optional.
# The default value is: .3.
# This tag requires that the tag GENERATE_MAN is set to YES.
MAN_EXTENSION = .3
# The MAN_SUBDIR tag determines the name of the directory created within
# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
MAN_SUBDIR =
# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
# will generate one additional man file for each entity documented in the real
# man page(s). These additional files only source the real man page, but without
# them the man command would be unable to find the correct page.
# The default value is: NO.
# This tag requires that the tag GENERATE_MAN is set to YES.
MAN_LINKS = NO
#---------------------------------------------------------------------------
# Configuration options related to the XML output
#---------------------------------------------------------------------------
# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
# captures the structure of the code including all documentation.
# The default value is: NO.
GENERATE_XML = NO
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
# it.
# The default directory is: xml.
# This tag requires that the tag GENERATE_XML is set to YES.
XML_OUTPUT = xml
# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
# listings (including syntax highlighting and cross-referencing information) to
# the XML output. Note that enabling this will significantly increase the size
# of the XML output.
# The default value is: YES.
# This tag requires that the tag GENERATE_XML is set to YES.
XML_PROGRAMLISTING = YES
# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
# namespace members in file scope as well, matching the HTML output.
# The default value is: NO.
# This tag requires that the tag GENERATE_XML is set to YES.
XML_NS_MEMB_FILE_SCOPE = NO
#---------------------------------------------------------------------------
# Configuration options related to the DOCBOOK output
#---------------------------------------------------------------------------
# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
# that can be used to generate PDF.
# The default value is: NO.
GENERATE_DOCBOOK = NO
# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
# front of it.
# The default directory is: docbook.
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
DOCBOOK_OUTPUT = docbook
#---------------------------------------------------------------------------
# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
# AutoGen Definitions (see https://autogen.sourceforge.net/) file that captures
# the structure of the code including all documentation. Note that this feature
# is still experimental and incomplete at the moment.
# The default value is: NO.
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to Sqlite3 output
#---------------------------------------------------------------------------
# If the GENERATE_SQLITE3 tag is set to YES doxygen will generate a Sqlite3
# database with symbols found by doxygen stored in tables.
# The default value is: NO.
GENERATE_SQLITE3 = NO
# The SQLITE3_OUTPUT tag is used to specify where the Sqlite3 database will be
# put. If a relative path is entered the value of OUTPUT_DIRECTORY will be put
# in front of it.
# The default directory is: sqlite3.
# This tag requires that the tag GENERATE_SQLITE3 is set to YES.
SQLITE3_OUTPUT = sqlite3
# The SQLITE3_RECREATE_DB tag is set to YES, the existing doxygen_sqlite3.db
# database file will be recreated with each doxygen run. If set to NO, doxygen
# will warn if a database file is already found and not modify it.
# The default value is: YES.
# This tag requires that the tag GENERATE_SQLITE3 is set to YES.
SQLITE3_RECREATE_DB = YES
#---------------------------------------------------------------------------
# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
# file that captures the structure of the code including all documentation.
#
# Note that this feature is still experimental and incomplete at the moment.
# The default value is: NO.
GENERATE_PERLMOD = NO
# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
# output from the Perl module output.
# The default value is: NO.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
PERLMOD_LATEX = NO
# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
# formatted so it can be parsed by a human reader. This is useful if you want to
# understand what is going on. On the other hand, if this tag is set to NO, the
# size of the Perl module output will be much smaller and Perl will parse it
# just the same.
# The default value is: YES.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
PERLMOD_PRETTY = YES
# The names of the make variables in the generated doxyrules.make file are
# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
# so different doxyrules.make files included by the same Makefile don't
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
# C-preprocessor directives found in the sources and include files.
# The default value is: YES.
ENABLE_PREPROCESSING = YES
# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
# in the source code. If set to NO, only conditional compilation will be
# performed. Macro expansion can be done in a controlled way by setting
# EXPAND_ONLY_PREDEF to YES.
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
MACRO_EXPANSION = NO
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
# the macro expansion is limited to the macros specified with the PREDEFINED and
# EXPAND_AS_DEFINED tags.
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_ONLY_PREDEF = NO
# If the SEARCH_INCLUDES tag is set to YES, the include files in the
# INCLUDE_PATH will be searched if a #include is found.
# The default value is: YES.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
SEARCH_INCLUDES = YES
# The INCLUDE_PATH tag can be used to specify one or more directories that
# contain include files that are not input files but should be processed by the
# preprocessor. Note that the INCLUDE_PATH is not recursive, so the setting of
# RECURSIVE has no effect here.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
INCLUDE_PATH =
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
# directories. If left blank, the patterns specified with FILE_PATTERNS will be
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
INCLUDE_FILE_PATTERNS =
# The PREDEFINED tag can be used to specify one or more macro names that are
# defined before the preprocessor is started (similar to the -D option of e.g.
# gcc). The argument of the tag is a list of macros of the form: name or
# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
# is assumed. To prevent a macro definition from being undefined via #undef or
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED =
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
# macro definition that is found in the sources will be used. Use the PREDEFINED
# tag if you want to use a different macro definition that overrules the
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
# remove all references to function-like macros that are alone on a line, have
# an all uppercase name, and do not end with a semicolon. Such function macros
# are typically used for boiler-plate code, and will confuse the parser if not
# removed.
# The default value is: YES.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration options related to external references
#---------------------------------------------------------------------------
# The TAGFILES tag can be used to specify one or more tag files. For each tag
# file the location of the external documentation should be added. The format of
# a tag file without this location is as follows:
# TAGFILES = file1 file2 ...
# Adding location for the tag files is done as follows:
# TAGFILES = file1=loc1 "file2 = loc2" ...
# where loc1 and loc2 can be relative or absolute paths or URLs. See the
# section "Linking to external documentation" for more information about the use
# of tag files.
# Note: Each tag file must have a unique name (where the name does NOT include
# the path). If a tag file is not located in the directory in which doxygen is
# run, you must also specify the path to the tagfile here.
TAGFILES =
# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
# tag file that is based on the input files it reads. See section "Linking to
# external documentation" for more information about the usage of tag files.
GENERATE_TAGFILE =
# If the ALLEXTERNALS tag is set to YES, all external classes and namespaces
# will be listed in the class and namespace index. If set to NO, only the
# inherited external classes will be listed.
# The default value is: NO.
ALLEXTERNALS = NO
# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
# in the topic index. If set to NO, only the current project's groups will be
# listed.
# The default value is: YES.
EXTERNAL_GROUPS = YES
# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
# the related pages index. If set to NO, only the current project's pages will
# be listed.
# The default value is: YES.
EXTERNAL_PAGES = YES
#---------------------------------------------------------------------------
# Configuration options related to diagram generator tools
#---------------------------------------------------------------------------
# If set to YES the inheritance and collaboration graphs will hide inheritance
# and usage relations if the target is undocumented or is not a class.
# The default value is: YES.
HIDE_UNDOC_RELATIONS = YES
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
# available from the path. This tool is part of Graphviz (see:
# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
# Bell Labs. The other options in this section have no effect if this option is
# set to NO
# The default value is: NO.
HAVE_DOT = NO
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
# to run in parallel. When set to 0 doxygen will base this on the number of
# processors available in the system. You can set it explicitly to a value
# larger than 0 to get control over the balance between CPU load and processing
# speed.
# Minimum value: 0, maximum value: 32, default value: 0.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_NUM_THREADS = 0
# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of
# subgraphs. When you want a differently looking font in the dot files that
# doxygen generates you can specify fontname, fontcolor and fontsize attributes.
# For details please see <a href=https://graphviz.org/doc/info/attrs.html>Node,
# Edge and Graph Attributes specification</a> You need to make sure dot is able
# to find the font, which can be done by putting it in a standard location or by
# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
# directory containing the font. Default graphviz fontsize is 14.
# The default value is: fontname=Helvetica,fontsize=10.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10"
# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can
# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. <a
# href=https://graphviz.org/doc/info/arrows.html>Complete documentation about
# arrows shapes.</a>
# The default value is: labelfontname=Helvetica,labelfontsize=10.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10"
# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes
# around nodes set 'shape=plain' or 'shape=plaintext' <a
# href=https://www.graphviz.org/doc/info/shapes.html>Shapes specification</a>
# The default value is: shape=box,height=0.2,width=0.4.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
# You can set the path where dot can find font specified with fontname in
# DOT_COMMON_ATTR and others dot attributes.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_FONTPATH =
# If the CLASS_GRAPH tag is set to YES or GRAPH or BUILTIN then doxygen will
# generate a graph for each documented class showing the direct and indirect
# inheritance relations. In case the CLASS_GRAPH tag is set to YES or GRAPH and
# HAVE_DOT is enabled as well, then dot will be used to draw the graph. In case
# the CLASS_GRAPH tag is set to YES and HAVE_DOT is disabled or if the
# CLASS_GRAPH tag is set to BUILTIN, then the built-in generator will be used.
# If the CLASS_GRAPH tag is set to TEXT the direct and indirect inheritance
# relations will be shown as texts / links. Explicit enabling an inheritance
# graph or choosing a different representation for an inheritance graph of a
# specific class, can be accomplished by means of the command \inheritancegraph.
# Disabling an inheritance graph can be accomplished by means of the command
# \hideinheritancegraph.
# Possible values are: NO, YES, TEXT, GRAPH and BUILTIN.
# The default value is: YES.
CLASS_GRAPH = YES
# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
# graph for each documented class showing the direct and indirect implementation
# dependencies (inheritance, containment, and class references variables) of the
# class with other documented classes. Explicit enabling a collaboration graph,
# when COLLABORATION_GRAPH is set to NO, can be accomplished by means of the
# command \collaborationgraph. Disabling a collaboration graph can be
# accomplished by means of the command \hidecollaborationgraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
COLLABORATION_GRAPH = YES
# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
# groups, showing the direct groups dependencies. Explicit enabling a group
# dependency graph, when GROUP_GRAPHS is set to NO, can be accomplished by means
# of the command \groupgraph. Disabling a directory graph can be accomplished by
# means of the command \hidegroupgraph. See also the chapter Grouping in the
# manual.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
GROUP_GRAPHS = YES
# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
# collaboration diagrams in a style similar to the OMG's Unified Modeling
# Language.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
UML_LOOK = NO
# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
# class node. If there are many fields or methods and many nodes the graph may
# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
# number of items for each type to make the size more manageable. Set this to 0
# for no limit. Note that the threshold may be exceeded by 50% before the limit
# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
# but if the number exceeds 15, the total amount of fields shown is limited to
# 10.
# Minimum value: 0, maximum value: 100, default value: 10.
# This tag requires that the tag UML_LOOK is set to YES.
UML_LIMIT_NUM_FIELDS = 10
# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
# tag is set to YES, doxygen will add type and arguments for attributes and
# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
# will not generate fields with class member information in the UML graphs. The
# class diagrams will look similar to the default class diagrams but using UML
# notation for the relationships.
# Possible values are: NO, YES and NONE.
# The default value is: NO.
# This tag requires that the tag UML_LOOK is set to YES.
DOT_UML_DETAILS = NO
# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
# to display on a single line. If the actual line length exceeds this threshold
# significantly it will be wrapped across multiple lines. Some heuristics are
# applied to avoid ugly line breaks.
# Minimum value: 0, maximum value: 1000, default value: 17.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_WRAP_THRESHOLD = 17
# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
# collaboration graphs will show the relations between templates and their
# instances.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
TEMPLATE_RELATIONS = NO
# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
# YES then doxygen will generate a graph for each documented file showing the
# direct and indirect include dependencies of the file with other documented
# files. Explicit enabling an include graph, when INCLUDE_GRAPH is is set to NO,
# can be accomplished by means of the command \includegraph. Disabling an
# include graph can be accomplished by means of the command \hideincludegraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
INCLUDE_GRAPH = YES
# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
# set to YES then doxygen will generate a graph for each documented file showing
# the direct and indirect include dependencies of the file with other documented
# files. Explicit enabling an included by graph, when INCLUDED_BY_GRAPH is set
# to NO, can be accomplished by means of the command \includedbygraph. Disabling
# an included by graph can be accomplished by means of the command
# \hideincludedbygraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
INCLUDED_BY_GRAPH = YES
# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
# dependency graph for every global function or class method.
#
# Note that enabling this option will significantly increase the time of a run.
# So in most cases it will be better to enable call graphs for selected
# functions only using the \callgraph command. Disabling a call graph can be
# accomplished by means of the command \hidecallgraph.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
CALL_GRAPH = NO
# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
# dependency graph for every global function or class method.
#
# Note that enabling this option will significantly increase the time of a run.
# So in most cases it will be better to enable caller graphs for selected
# functions only using the \callergraph command. Disabling a caller graph can be
# accomplished by means of the command \hidecallergraph.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
CALLER_GRAPH = NO
# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
# hierarchy of all classes instead of a textual one.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
GRAPHICAL_HIERARCHY = YES
# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
# dependencies a directory has on other directories in a graphical way. The
# dependency relations are determined by the #include relations between the
# files in the directories. Explicit enabling a directory graph, when
# DIRECTORY_GRAPH is set to NO, can be accomplished by means of the command
# \directorygraph. Disabling a directory graph can be accomplished by means of
# the command \hidedirectorygraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
DIRECTORY_GRAPH = YES
# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels
# of child directories generated in directory dependency graphs by dot.
# Minimum value: 1, maximum value: 25, default value: 1.
# This tag requires that the tag DIRECTORY_GRAPH is set to YES.
DIR_GRAPH_MAX_DEPTH = 1
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. For an explanation of the image formats see the section
# output formats in the documentation of the dot tool (Graphviz (see:
# https://www.graphviz.org/)).
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
# to make the SVG files visible in IE 9+ (other browsers do not have this
# requirement).
# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
# png:gdiplus:gdiplus.
# The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_IMAGE_FORMAT = png
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning.
#
# Note that this requires a modern browser other than Internet Explorer. Tested
# and working are Firefox, Chrome, Safari, and Opera.
# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
# the SVG files visible. Older versions of IE do not have SVG support.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
INTERACTIVE_SVG = NO
# The DOT_PATH tag can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_PATH =
# The DOTFILE_DIRS tag can be used to specify one or more directories that
# contain dot files that are included in the documentation (see the \dotfile
# command).
# This tag requires that the tag HAVE_DOT is set to YES.
DOTFILE_DIRS =
# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
# If left empty dia is assumed to be found in the default search path.
DIA_PATH =
# The DIAFILE_DIRS tag can be used to specify one or more directories that
# contain dia files that are included in the documentation (see the \diafile
# command).
DIAFILE_DIRS =
# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
# path where java can find the plantuml.jar file or to the filename of jar file
# to be used. If left blank, it is assumed PlantUML is not used or called during
# a preprocessing step. Doxygen will generate a warning when it encounters a
# \startuml command in this case and will not generate output for the diagram.
PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
PLANTUML_CFG_FILE =
# When using plantuml, the specified paths are searched for files specified by
# the !include statement in a plantuml block.
PLANTUML_INCLUDE_PATH =
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
# that will be shown in the graph. If the number of nodes in a graph becomes
# larger than this value, doxygen will truncate the graph, which is visualized
# by representing a node as a red box. Note that if the number of direct
# children of the root node in a graph is already larger than
# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
# Minimum value: 0, maximum value: 10000, default value: 50.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_GRAPH_MAX_NODES = 50
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
# generated by dot. A depth value of 3 means that only nodes reachable from the
# root by following a path via at most 3 edges will be shown. Nodes that lay
# further from the root node will be omitted. Note that setting this option to 1
# or 2 may greatly reduce the computation time needed for large code bases. Also
# note that the size of a graph can be further restricted by
# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
# Minimum value: 0, maximum value: 1000, default value: 0.
# This tag requires that the tag HAVE_DOT is set to YES.
MAX_DOT_GRAPH_DEPTH = 0
# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
# files in one run (i.e. multiple -o and -T options on the command line). This
# makes dot run faster, but since only newer versions of dot (>1.8.10) support
# this, this feature is disabled by default.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_MULTI_TARGETS = NO
# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
# explaining the meaning of the various boxes and arrows in the dot generated
# graphs.
# Note: This tag requires that UML_LOOK isn't set, i.e. the doxygen internal
# graphical representation for inheritance and collaboration diagrams is used.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
GENERATE_LEGEND = YES
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate
# files that are used to generate the various graphs.
#
# Note: This setting is not only used for dot files but also for msc temporary
# files.
# The default value is: YES.
DOT_CLEANUP = YES
# You can define message sequence charts within doxygen comments using the \msc
# command. If the MSCGEN_TOOL tag is left empty (the default), then doxygen will
# use a built-in version of mscgen tool to produce the charts. Alternatively,
# the MSCGEN_TOOL tag can also specify the name an external tool. For instance,
# specifying prog as the value, doxygen will call the tool as prog -T
# <outfile_format> -o <outputfile> <inputfile>. The external tool should support
# output file formats "png", "eps", "svg", and "ismap".
MSCGEN_TOOL =
# The MSCFILE_DIRS tag can be used to specify one or more directories that
# contain msc files that are included in the documentation (see the \mscfile
# command).
MSCFILE_DIRS =
================================================
FILE: doc/mimalloc-doc.h
================================================
/* ----------------------------------------------------------------------------
Copyright (c) 2018-2025, Microsoft Research, Daan Leijen
This is free software; you can redistribute it and/or modify it under the
terms of the MIT license. A copy of the license can be found in the file
"LICENSE" at the root of this distribution.
-----------------------------------------------------------------------------*/
#error "documentation file only!"
/*! \mainpage
This is the API documentation of the
[mimalloc](https://github.com/microsoft/mimalloc) allocator
(pronounced "me-malloc") -- a
general purpose allocator with excellent [performance](bench.html)
characteristics. Initially
developed by Daan Leijen for the run-time systems of the
[Koka](https://github.com/koka-lang/koka) and [Lean](https://github.com/leanprover/lean) languages.
It is a drop-in replacement for `malloc` and can be used in other programs
without code changes, for example, on Unix you can use it as:
```
> LD_PRELOAD=/usr/bin/libmimalloc.so myprogram
```
Notable aspects of the design include:
- __small and consistent__: the core library is about 10k LOC using simple and
consistent data structures. This makes it very suitable
to integrate and adapt in other projects. For runtime systems it
provides hooks for a monotonic _heartbeat_ and deferred freeing (for
bounded worst-case times with reference counting).
Partly due to its simplicity, mimalloc has been ported to many systems (Windows, macOS,
Linux, WASM, various BSD's, Haiku, MUSL, etc) and has excellent support for dynamic overriding.
At the same time, it is an industrial strength allocator that runs (very) large scale
distributed services on thousands of machines with excellent worst case latencies.
- __free list sharding__: instead of one big free list (per size class) we have
many smaller lists per "mimalloc page" which reduces fragmentation and
increases locality --
things that are allocated close in time get allocated close in memory.
(A mimalloc page contains blocks of one size class and is usually 64KiB on a 64-bit system).
- __free list multi-sharding__: the big idea! Not only do we shard the free list
per mimalloc page, but for each page we have multiple free lists. In particular, there
is one list for thread-local `free` operations, and another one for concurrent `free`
operations. Free-ing from another thread can now be a single CAS without needing
sophisticated coordination between threads. Since there will be
thousands of separate free lists, contention is naturally distributed over the heap,
and the chance of contending on a single location will be low -- this is quite
similar to randomized algorithms like skip lists where adding
a random oracle removes the need for a more complex algorithm.
- __eager page purging__: when a "page" becomes empty (with increased chance
due to free list sharding) the memory is marked to the OS as unused (reset or decommitted)
reducing (real) memory pressure and fragmentation, especially in long running
programs.
- __secure__: _mimalloc_ can be built in secure mode, adding guard pages,
randomized allocation, encrypted free lists, etc. to protect against various
heap vulnerabilities. The performance penalty is usually around 10% on average
over our benchmarks.
- __first-class heaps__: efficiently create and use multiple heaps to allocate across different regions.
A heap can be destroyed at once instead of deallocating each object separately.
v3.2+ has true first-class heaps where one can allocate in a heap from any thread.
- __bounded__: it does not suffer from _blowup_ \[1\], has bounded worst-case allocation
times (_wcat_) (upto OS primitives), bounded space overhead (~0.2% meta-data, with low
internal fragmentation), and has no internal points of contention using only atomic operations.
- __fast__: In our benchmarks (see [below](#bench)),
_mimalloc_ outperforms other leading allocators (_jemalloc_, _tcmalloc_, _Hoard_, etc),
and often uses less memory. A nice property is that it does consistently well over a wide range
of benchmarks. There is also good huge OS page support for larger server programs.
There are three maintained versions of mimalloc. All versions are mostly equal except for
how the OS memory is handled. New development is mostly on v3, while v1 and v2 are maintained
with security and bug fixes.
- __v1__: initial design of mimalloc (release tags: `v1.9.x`, development branch `dev`). Send PR's against this version if possible.
- __v2__: main mimalloc version. Uses thread-local segments to reduce fragmentation. (release tags: `v2.2.x`, development branch `dev2`)
- __v3__: simplifies the lock-free design
gitextract_58sidcpj/
├── .gitattributes
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── SECURITY.md
├── azure-pipelines.yml
├── bin/
│ ├── mimalloc-redirect-arm64.lib
│ ├── mimalloc-redirect-arm64ec.lib
│ ├── mimalloc-redirect.lib
│ ├── mimalloc-redirect32.lib
│ └── readme.md
├── cmake/
│ ├── JoinPaths.cmake
│ ├── mimalloc-config-version.cmake
│ └── mimalloc-config.cmake
├── contrib/
│ ├── docker/
│ │ ├── alpine/
│ │ │ └── Dockerfile
│ │ ├── alpine-arm32v7/
│ │ │ └── Dockerfile
│ │ ├── alpine-x86/
│ │ │ └── Dockerfile
│ │ ├── manylinux-x64/
│ │ │ └── Dockerfile
│ │ └── readme.md
│ ├── nuget/
│ │ └── nuget-release-pipeline.yml
│ └── vcpkg/
│ ├── portfile.cmake
│ ├── readme.md
│ ├── usage
│ ├── vcpkg-cmake-wrapper.cmake
│ └── vcpkg.json
├── doc/
│ ├── doxyfile
│ ├── mimalloc-doc.h
│ └── mimalloc-doxygen.css
├── ide/
│ └── vs2022/
│ ├── mimalloc-lib.vcxproj
│ ├── mimalloc-lib.vcxproj.filters
│ ├── mimalloc-override-dll.vcxproj
│ ├── mimalloc-override-dll.vcxproj.filters
│ ├── mimalloc-override-test-dep.vcxproj
│ ├── mimalloc-override-test.vcxproj
│ ├── mimalloc-test-api.vcxproj
│ ├── mimalloc-test-stress.vcxproj
│ ├── mimalloc-test.vcxproj
│ └── mimalloc.sln
├── include/
│ ├── mimalloc/
│ │ ├── atomic.h
│ │ ├── internal.h
│ │ ├── prim.h
│ │ ├── track.h
│ │ └── types.h
│ ├── mimalloc-new-delete.h
│ ├── mimalloc-override.h
│ ├── mimalloc-stats.h
│ └── mimalloc.h
├── mimalloc.pc.in
├── readme.md
├── src/
│ ├── alloc-aligned.c
│ ├── alloc-override.c
│ ├── alloc-posix.c
│ ├── alloc.c
│ ├── arena-abandon.c
│ ├── arena.c
│ ├── bitmap.c
│ ├── bitmap.h
│ ├── free.c
│ ├── heap.c
│ ├── init.c
│ ├── libc.c
│ ├── options.c
│ ├── os.c
│ ├── page-queue.c
│ ├── page.c
│ ├── prim/
│ │ ├── emscripten/
│ │ │ └── prim.c
│ │ ├── osx/
│ │ │ ├── alloc-override-zone.c
│ │ │ └── prim.c
│ │ ├── prim.c
│ │ ├── readme.md
│ │ ├── unix/
│ │ │ └── prim.c
│ │ ├── wasi/
│ │ │ └── prim.c
│ │ └── windows/
│ │ ├── etw-mimalloc.wprp
│ │ ├── etw.h
│ │ ├── etw.man
│ │ ├── prim.c
│ │ └── readme.md
│ ├── random.c
│ ├── segment-map.c
│ ├── segment.c
│ ├── static.c
│ └── stats.c
└── test/
├── CMakeLists.txt
├── main-override-dep.cpp
├── main-override-dep.h
├── main-override-static.c
├── main-override.c
├── main-override.cpp
├── main.c
├── readme.md
├── test-api-fill.c
├── test-api.c
├── test-stress.c
├── test-wrong.c
└── testhelper.h
SYMBOL INDEX (1145 symbols across 46 files)
FILE: doc/mimalloc-doc.h
type mi_heap_s (line 458) | struct mi_heap_s
type mi_heap_t (line 465) | typedef struct mi_heap_s mi_heap_t;
type mi_heap_area_t (line 627) | typedef struct mi_heap_area_s {
type mi_arena_id_t (line 694) | typedef int mi_arena_id_t;
type mi_stats_s (line 1029) | struct mi_stats_s {
type mi_stats_t (line 1037) | typedef struct mi_stats_s mi_stats_t;
type mi_option_t (line 1190) | typedef enum mi_option_e {
type mi_theap_s (line 1279) | struct mi_theap_s
type mi_theap_t (line 1282) | typedef struct mi_theap_s mi_theap_t;
FILE: include/mimalloc-new-delete.h
function delete (line 34) | void operator delete(void* p) noexcept { mi_free(p); }
function noexcept (line 35) | void operator delete[](void* p) noexcept { mi_free(p); }
function operator (line 37) | void operator delete (void* p, const std::nothrow_t&) noexcept { mi_fre...
function noexcept (line 38) | void operator delete[](void* p, const std::nothrow_t&) noexcept { mi_fre...
function operator (line 47) | void operator delete (void* p, std::size_t n) noexcept { mi_free_size(p...
function noexcept (line 48) | void operator delete[](void* p, std::size_t n) noexcept { mi_free_size(p...
function operator (line 52) | void operator delete (void* p, std::align_val_t al) noexcept { mi_free_...
function noexcept (line 53) | void operator delete[](void* p, std::align_val_t al) noexcept { mi_free_...
function operator (line 54) | void operator delete (void* p, std::size_t n, std::align_val_t al) noex...
function noexcept (line 55) | void operator delete[](void* p, std::size_t n, std::align_val_t al) noex...
function operator (line 56) | void operator delete (void* p, std::align_val_t al, const std::nothrow_...
function noexcept (line 57) | void operator delete[](void* p, std::align_val_t al, const std::nothrow_...
FILE: include/mimalloc-stats.h
type mi_stat_count_t (line 17) | typedef struct mi_stat_count_s {
type mi_stat_counter_t (line 24) | typedef struct mi_stat_counter_s {
function MI_STAT_COUNT (line 30) | MI_STAT_COUNT(reserved) /* reserved memory bytes */ \
FILE: include/mimalloc.h
type mi_heap_s (line 208) | struct mi_heap_s
type mi_heap_t (line 209) | typedef struct mi_heap_s mi_heap_t;
type mi_heap_area_t (line 276) | typedef struct mi_heap_area_s {
type mi_arena_id_t (line 304) | typedef int mi_arena_id_t;
type mi_option_t (line 370) | typedef enum mi_option_e {
type T (line 498) | typedef T value_type;
type std (line 499) | typedef std::size_t size_type;
type std (line 500) | typedef std::ptrdiff_t difference_type;
type value_type (line 501) | typedef value_type& reference;
type value_type (line 502) | typedef value_type const& const_reference;
type value_type (line 503) | typedef value_type* pointer;
type value_type (line 504) | typedef value_type const* const_pointer;
function construct (line 513) | void construct(pointer p, value_type const& val) { ::new(p) value_type(v...
function destroy (line 514) | void destroy(pointer p) { p->~value_type(); }
function pointer (line 518) | pointer address(reference x) const { return &x; }
function const_pointer (line 519) | const_pointer address(const_reference x) const { return &x; }
type mi_stl_allocator (line 526) | typedef mi_stl_allocator<U> other;
function mi_decl_nodiscard (line 564) | mi_decl_nodiscard T* allocate(size_type count) { return static_cast<T*>(...
function mi_decl_nodiscard (line 565) | mi_decl_nodiscard T* allocate(size_type count, const void*) { return all...
function collect (line 574) | void collect(bool force) { mi_heap_collect(this->heap.get(), force); }
type _mi_heap_stl_allocator_common (line 579) | struct _mi_heap_stl_allocator_common
function heap (line 585) | _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi...
function heap_destroy (line 590) | static void heap_destroy(mi_heap_t* hp) { if (hp != NULL) { mi_heap_dest...
type mi_heap_stl_allocator (line 602) | typedef mi_heap_stl_allocator<U> other;
type mi_heap_destroy_stl_allocator (line 619) | typedef mi_heap_destroy_stl_allocator<U> other;
FILE: include/mimalloc/atomic.h
function mi_atomic_addi64_relaxed (line 131) | static inline int64_t mi_atomic_addi64_relaxed(volatile int64_t* p, int6...
function mi_atomic_void_addi64_relaxed (line 134) | static inline void mi_atomic_void_addi64_relaxed(volatile int64_t* p, co...
function mi_atomic_maxi64_relaxed (line 140) | static inline void mi_atomic_maxi64_relaxed(volatile int64_t* p, int64_t...
type LONG64 (line 160) | typedef LONG64 msc_intptr_t;
type LONG (line 163) | typedef LONG msc_intptr_t;
type mi_memory_order (line 167) | typedef enum mi_memory_order_e {
function mi_atomic_fetch_add_explicit (line 176) | static inline uintptr_t mi_atomic_fetch_add_explicit(_Atomic(uintptr_t)*...
function mi_atomic_fetch_sub_explicit (line 180) | static inline uintptr_t mi_atomic_fetch_sub_explicit(_Atomic(uintptr_t)*...
function mi_atomic_fetch_and_explicit (line 184) | static inline uintptr_t mi_atomic_fetch_and_explicit(_Atomic(uintptr_t)*...
function mi_atomic_fetch_or_explicit (line 188) | static inline uintptr_t mi_atomic_fetch_or_explicit(_Atomic(uintptr_t)*p...
function mi_atomic_compare_exchange_strong_explicit (line 192) | static inline bool mi_atomic_compare_exchange_strong_explicit(_Atomic(ui...
function mi_atomic_compare_exchange_weak_explicit (line 203) | static inline bool mi_atomic_compare_exchange_weak_explicit(_Atomic(uint...
function mi_atomic_exchange_explicit (line 206) | static inline uintptr_t mi_atomic_exchange_explicit(_Atomic(uintptr_t)*p...
function mi_atomic_thread_fence (line 210) | static inline void mi_atomic_thread_fence(mi_memory_order mo) {
function mi_atomic_load_explicit (line 215) | static inline uintptr_t mi_atomic_load_explicit(_Atomic(uintptr_t) const...
function mi_atomic_store_explicit (line 227) | static inline void mi_atomic_store_explicit(_Atomic(uintptr_t)*p, uintpt...
function mi_atomic_loadi64_explicit (line 235) | static inline int64_t mi_atomic_loadi64_explicit(_Atomic(int64_t)*p, mi_...
function mi_atomic_storei64_explicit (line 248) | static inline void mi_atomic_storei64_explicit(_Atomic(int64_t)*p, int64...
function mi_atomic_addi64_relaxed (line 258) | static inline int64_t mi_atomic_addi64_relaxed(volatile _Atomic(int64_t)...
function mi_atomic_void_addi64_relaxed (line 271) | static inline void mi_atomic_void_addi64_relaxed(volatile int64_t* p, co...
function mi_atomic_maxi64_relaxed (line 278) | static inline void mi_atomic_maxi64_relaxed(volatile _Atomic(int64_t)*p,...
function mi_atomic_addi64_acq_rel (line 285) | static inline void mi_atomic_addi64_acq_rel(volatile _Atomic(int64_t*)p,...
function mi_atomic_casi64_strong_acq_rel (line 289) | static inline bool mi_atomic_casi64_strong_acq_rel(volatile _Atomic(int6...
function mi_atomic_addi (line 323) | static inline intptr_t mi_atomic_addi(_Atomic(intptr_t)*p, intptr_t add) {
function mi_atomic_subi (line 328) | static inline intptr_t mi_atomic_subi(_Atomic(intptr_t)*p, intptr_t sub) {
type mi_atomic_once_t (line 337) | typedef _Atomic(uintptr_t) mi_atomic_once_t;
function mi_atomic_once (line 340) | static inline bool mi_atomic_once( mi_atomic_once_t* once ) {
type mi_atomic_guard_t (line 346) | typedef _Atomic(uintptr_t) mi_atomic_guard_t;
function mi_atomic_yield (line 363) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 367) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 372) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 380) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 384) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 389) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 393) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 399) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 403) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 411) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 416) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 421) | static inline void mi_atomic_yield(void) {
function mi_lock_try_acquire (line 444) | static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
function mi_lock_acquire (line 447) | static inline void mi_lock_acquire(mi_lock_t* lock) {
function mi_lock_release (line 450) | static inline void mi_lock_release(mi_lock_t* lock) {
function mi_lock_init (line 453) | static inline void mi_lock_init(mi_lock_t* lock) {
function mi_lock_done (line 456) | static inline void mi_lock_done(mi_lock_t* lock) {
function mi_lock_try_acquire (line 463) | static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
function mi_lock_acquire (line 466) | static inline void mi_lock_acquire(mi_lock_t* lock) {
function mi_lock_release (line 469) | static inline void mi_lock_release(mi_lock_t* lock) {
function mi_lock_init (line 472) | static inline void mi_lock_init(mi_lock_t* lock) {
function mi_lock_done (line 475) | static inline void mi_lock_done(mi_lock_t* lock) {
function mi_lock_try_acquire (line 487) | static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
function mi_lock_acquire (line 490) | static inline void mi_lock_acquire(mi_lock_t* lock) {
function mi_lock_release (line 496) | static inline void mi_lock_release(mi_lock_t* lock) {
function mi_lock_init (line 499) | static inline void mi_lock_init(mi_lock_t* lock) {
function mi_lock_done (line 502) | static inline void mi_lock_done(mi_lock_t* lock) {
function mi_lock_try_acquire (line 511) | static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
function mi_lock_acquire (line 514) | static inline void mi_lock_acquire(mi_lock_t* lock) {
function mi_lock_release (line 517) | static inline void mi_lock_release(mi_lock_t* lock) {
function mi_lock_init (line 520) | static inline void mi_lock_init(mi_lock_t* lock) {
function mi_lock_done (line 523) | static inline void mi_lock_done(mi_lock_t* lock) {
function mi_lock_try_acquire (line 534) | static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
function mi_lock_acquire (line 538) | static inline void mi_lock_acquire(mi_lock_t* lock) {
function mi_lock_release (line 544) | static inline void mi_lock_release(mi_lock_t* lock) {
function mi_lock_init (line 547) | static inline void mi_lock_init(mi_lock_t* lock) {
function mi_lock_done (line 550) | static inline void mi_lock_done(mi_lock_t* lock) {
FILE: include/mimalloc/internal.h
type mi_arena_field_cursor_t (line 203) | typedef struct mi_arena_field_cursor_s { // abstract struct
function _mi_is_power_of_two (line 374) | static inline bool _mi_is_power_of_two(uintptr_t x) {
function _mi_is_aligned (line 379) | static inline bool _mi_is_aligned(void* p, size_t alignment) {
function _mi_align_up (line 385) | static inline uintptr_t _mi_align_up(uintptr_t sz, size_t alignment) {
function _mi_align_down (line 397) | static inline uintptr_t _mi_align_down(uintptr_t sz, size_t alignment) {
function _mi_divide_up (line 420) | static inline uintptr_t _mi_divide_up(uintptr_t size, size_t divider) {
function _mi_clamp (line 427) | static inline size_t _mi_clamp(size_t sz, size_t min, size_t max) {
function mi_mem_is_zero (line 434) | static inline bool mi_mem_is_zero(const void* p, size_t size) {
function _mi_wsize_from_size (line 444) | static inline size_t _mi_wsize_from_size(size_t size) {
function mi_mul_overflow (line 455) | static inline bool mi_mul_overflow(size_t count, size_t size, size_t* to...
function mi_mul_overflow (line 465) | static inline bool mi_mul_overflow(size_t count, size_t size, size_t* to...
function mi_count_size_overflow (line 474) | static inline bool mi_count_size_overflow(size_t count, size_t size, siz...
function mi_heap_is_backing (line 496) | static inline bool mi_heap_is_backing(const mi_heap_t* heap) {
function mi_heap_is_initialized (line 500) | static inline bool mi_heap_is_initialized(mi_heap_t* heap) {
function _mi_ptr_cookie (line 505) | static inline uintptr_t _mi_ptr_cookie(const void* p) {
function mi_page_t (line 515) | static inline mi_page_t* _mi_heap_get_free_small_page(mi_heap_t* heap, s...
function mi_segment_t (line 527) | static inline mi_segment_t* _mi_ptr_segment(const void* p) {
function mi_page_t (line 536) | static inline mi_page_t* mi_slice_to_page(mi_slice_t* s) {
function mi_slice_t (line 541) | static inline mi_slice_t* mi_page_to_slice(mi_page_t* p) {
function mi_segment_t (line 547) | static inline mi_segment_t* _mi_page_segment(const mi_page_t* page) {
function mi_slice_t (line 554) | static inline mi_slice_t* mi_slice_first(const mi_slice_t* slice) {
function mi_page_t (line 563) | static inline mi_page_t* _mi_segment_page_of(const mi_segment_t* segment...
function mi_page_t (line 584) | static inline mi_page_t* _mi_ptr_page(void* p) {
function mi_page_block_size (line 590) | static inline size_t mi_page_block_size(const mi_page_t* page) {
function mi_page_is_huge (line 595) | static inline bool mi_page_is_huge(const mi_page_t* page) {
function mi_page_usable_block_size (line 603) | static inline size_t mi_page_usable_block_size(const mi_page_t* page) {
function mi_segment_size (line 608) | static inline size_t mi_segment_size(mi_segment_t* segment) {
function mi_block_t (line 617) | static inline mi_block_t* mi_page_thread_free(const mi_page_t* page) {
function mi_delayed_t (line 621) | static inline mi_delayed_t mi_page_thread_free_flag(const mi_page_t* pag...
function mi_heap_t (line 626) | static inline mi_heap_t* mi_page_heap(const mi_page_t* page) {
function mi_page_set_heap (line 630) | static inline void mi_page_set_heap(mi_page_t* page, mi_heap_t* heap) {
function mi_block_t (line 637) | static inline mi_block_t* mi_tf_block(mi_thread_free_t tf) {
function mi_delayed_t (line 640) | static inline mi_delayed_t mi_tf_delayed(mi_thread_free_t tf) {
function mi_thread_free_t (line 643) | static inline mi_thread_free_t mi_tf_make(mi_block_t* block, mi_delayed_...
function mi_thread_free_t (line 646) | static inline mi_thread_free_t mi_tf_set_delayed(mi_thread_free_t tf, mi...
function mi_thread_free_t (line 649) | static inline mi_thread_free_t mi_tf_set_block(mi_thread_free_t tf, mi_b...
function mi_page_all_free (line 655) | static inline bool mi_page_all_free(const mi_page_t* page) {
function mi_page_has_any_available (line 661) | static inline bool mi_page_has_any_available(const mi_page_t* page) {
function mi_page_immediate_available (line 667) | static inline bool mi_page_immediate_available(const mi_page_t* page) {
function mi_page_is_mostly_used (line 673) | static inline bool mi_page_is_mostly_used(const mi_page_t* page) {
function mi_page_queue_t (line 679) | static inline mi_page_queue_t* mi_page_queue(const mi_heap_t* heap, size...
function mi_page_is_in_full (line 688) | static inline bool mi_page_is_in_full(const mi_page_t* page) {
function mi_page_set_in_full (line 692) | static inline void mi_page_set_in_full(mi_page_t* page, bool in_full) {
function mi_page_has_aligned (line 696) | static inline bool mi_page_has_aligned(const mi_page_t* page) {
function mi_page_set_has_aligned (line 700) | static inline void mi_page_set_has_aligned(mi_page_t* page, bool has_ali...
function mi_block_ptr_is_guarded (line 708) | static inline bool mi_block_ptr_is_guarded(const mi_block_t* block, cons...
function mi_heap_malloc_use_guarded (line 713) | static inline bool mi_heap_malloc_use_guarded(mi_heap_t* heap, size_t si...
function mi_is_in_same_segment (line 763) | static inline bool mi_is_in_same_segment(const void* p, const void* q) {
function mi_is_in_same_page (line 767) | static inline bool mi_is_in_same_page(const void* p, const void* q) {
function mi_rotl (line 777) | static inline uintptr_t mi_rotl(uintptr_t x, uintptr_t shift) {
function mi_rotr (line 781) | static inline uintptr_t mi_rotr(uintptr_t x, uintptr_t shift) {
function mi_encoded_t (line 791) | static inline mi_encoded_t mi_ptr_encode(const void* null, const void* p...
function mi_ptr_encode_canary (line 796) | static inline uint32_t mi_ptr_encode_canary(const void* null, const void...
function mi_block_t (line 806) | static inline mi_block_t* mi_block_nextx( const void* null, const mi_blo...
function mi_block_set_nextx (line 819) | static inline void mi_block_set_nextx(const void* null, mi_block_t* bloc...
function mi_block_t (line 830) | static inline mi_block_t* mi_block_next(const mi_page_t* page, const mi_...
function mi_block_set_next (line 846) | static inline void mi_block_set_next(const mi_page_t* page, mi_block_t* ...
function mi_commit_mask_create_empty (line 860) | static inline void mi_commit_mask_create_empty(mi_commit_mask_t* cm) {
function mi_commit_mask_create_full (line 866) | static inline void mi_commit_mask_create_full(mi_commit_mask_t* cm) {
function mi_commit_mask_is_empty (line 872) | static inline bool mi_commit_mask_is_empty(const mi_commit_mask_t* cm) {
function mi_commit_mask_is_full (line 879) | static inline bool mi_commit_mask_is_full(const mi_commit_mask_t* cm) {
function mi_memid_t (line 904) | static inline mi_memid_t _mi_memid_create(mi_memkind_t memkind) {
function mi_memid_t (line 911) | static inline mi_memid_t _mi_memid_none(void) {
function mi_memid_t (line 915) | static inline mi_memid_t _mi_memid_create_os(void* base, size_t size, bo...
function _mi_random_shuffle (line 930) | static inline uintptr_t _mi_random_shuffle(uintptr_t x) {
function mi_clz (line 960) | static inline size_t mi_clz(size_t x) {
function mi_ctz (line 968) | static inline size_t mi_ctz(size_t x) {
function mi_clz (line 982) | static inline size_t mi_clz(size_t x) {
function mi_ctz (line 992) | static inline size_t mi_ctz(size_t x) {
function mi_ctz_generic32 (line 1005) | static inline size_t mi_ctz_generic32(uint32_t x) {
function mi_clz_generic32 (line 1015) | static inline size_t mi_clz_generic32(uint32_t x) {
function mi_ctz (line 1030) | static inline size_t mi_ctz(size_t x) {
function mi_clz (line 1045) | static inline size_t mi_clz(size_t x) {
function mi_bsr (line 1063) | static inline size_t mi_bsr(size_t x) {
function mi_popcount (line 1069) | static inline size_t mi_popcount(size_t x) {
function _mi_memcpy (line 1095) | static inline void _mi_memcpy(void* dst, const void* src, size_t n) {
function _mi_memzero (line 1103) | static inline void _mi_memzero(void* dst, size_t n) {
function _mi_memcpy (line 1112) | static inline void _mi_memcpy(void* dst, const void* src, size_t n) {
function _mi_memzero (line 1115) | static inline void _mi_memzero(void* dst, size_t n) {
function _mi_memcpy_aligned (line 1127) | static inline void _mi_memcpy_aligned(void* dst, const void* src, size_t...
function _mi_memzero_aligned (line 1134) | static inline void _mi_memzero_aligned(void* dst, size_t n) {
function _mi_memcpy_aligned (line 1141) | static inline void _mi_memcpy_aligned(void* dst, const void* src, size_t...
function _mi_memzero_aligned (line 1146) | static inline void _mi_memzero_aligned(void* dst, size_t n) {
FILE: include/mimalloc/prim.h
type mi_os_mem_config_t (line 24) | typedef struct mi_os_mem_config_s {
type mi_process_info_t (line 90) | typedef struct mi_process_info_s {
function mi_prim_tls_slot_set (line 182) | static inline void mi_prim_tls_slot_set(size_t slot, void* value) mi_att...
function mi_prim_tls_slot_set (line 237) | static inline void mi_prim_tls_slot_set(size_t slot, void* value) mi_att...
function mi_threadid_t (line 282) | static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {
function mi_threadid_t (line 288) | static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {
function mi_threadid_t (line 295) | static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {
function mi_threadid_t (line 302) | static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {
function mi_threadid_t (line 318) | static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {
function mi_heap_t (line 370) | static inline mi_heap_t* mi_prim_get_default_heap(void) {
function mi_heap_t (line 385) | static inline mi_heap_t** mi_prim_tls_pthread_heap_slot(void) {
function mi_heap_t (line 393) | static inline mi_heap_t* mi_prim_get_default_heap(void) {
function mi_heap_t (line 404) | static inline mi_heap_t* mi_prim_get_default_heap(void) {
function mi_heap_t (line 411) | static inline mi_heap_t* mi_prim_get_default_heap(void) {
FILE: include/mimalloc/types.h
type mi_ssize_t (line 140) | typedef int64_t mi_ssize_t;
type mi_ssize_t (line 143) | typedef int32_t mi_ssize_t;
type mi_encoded_t (line 241) | typedef uintptr_t mi_encoded_t;
type mi_threadid_t (line 244) | typedef size_t mi_threadid_t;
type mi_block_t (line 247) | typedef struct mi_block_s {
type mi_delayed_t (line 260) | typedef enum mi_delayed_e {
type mi_page_flags_t (line 271) | typedef union mi_page_flags_s {
type mi_page_flags_t (line 280) | typedef union mi_page_flags_s {
type mi_thread_free_t (line 291) | typedef uintptr_t mi_thread_free_t;
type mi_page_t (line 321) | typedef struct mi_page_s {
type mi_page_kind_t (line 365) | typedef enum mi_page_kind_e {
type mi_segment_kind_t (line 373) | typedef enum mi_segment_kind_e {
type mi_commit_mask_t (line 400) | typedef struct mi_commit_mask_s {
type mi_page_t (line 404) | typedef mi_page_t mi_slice_t;
type mi_msecs_t (line 405) | typedef int64_t mi_msecs_t;
type mi_memkind_t (line 413) | typedef enum mi_memkind_e {
function mi_memkind_is_os (line 423) | static inline bool mi_memkind_is_os(mi_memkind_t memkind) {
type mi_memid_os_info_t (line 427) | typedef struct mi_memid_os_info {
type mi_memid_arena_info_t (line 432) | typedef struct mi_memid_arena_info {
type mi_memid_t (line 438) | typedef struct mi_memid_s {
type mi_subproc_t (line 464) | typedef struct mi_subproc_s mi_subproc_t;
type mi_segment_t (line 466) | typedef struct mi_segment_s {
type mi_tld_t (line 519) | typedef struct mi_tld_s mi_tld_t;
type mi_page_queue_t (line 522) | typedef struct mi_page_queue_s {
type mi_random_ctx_t (line 531) | typedef struct mi_random_cxt_s {
type mi_padding_t (line 541) | typedef struct mi_padding_s {
type mi_heap_s (line 556) | struct mi_heap_s {
type mi_subproc_s (line 589) | struct mi_subproc_s {
type mi_span_queue_t (line 606) | typedef struct mi_span_queue_s {
type mi_segments_tld_t (line 615) | typedef struct mi_segments_tld_s {
type mi_tld_s (line 627) | struct mi_tld_s {
FILE: src/alloc-aligned.c
function mi_malloc_is_naturally_aligned (line 18) | static bool mi_malloc_is_naturally_aligned( size_t size, size_t alignmen...
function mi_decl_restrict (line 28) | static mi_decl_restrict void* mi_heap_malloc_guarded_aligned(mi_heap_t* ...
function mi_decl_noinline (line 55) | static mi_decl_noinline void* mi_heap_malloc_zero_aligned_at_overalloc(m...
function mi_decl_noinline (line 135) | static mi_decl_noinline void* mi_heap_malloc_zero_aligned_at_generic(mi_...
function mi_likely (line 153) | mi_likely(is_aligned_or_null) {
function mi_likely (line 194) | mi_likely(is_aligned)
function mi_decl_nodiscard (line 319) | mi_decl_nodiscard void* mi_heap_realloc_aligned_at(mi_heap_t* heap, void...
function mi_decl_nodiscard (line 323) | mi_decl_nodiscard void* mi_heap_realloc_aligned(mi_heap_t* heap, void* p...
function mi_decl_nodiscard (line 327) | mi_decl_nodiscard void* mi_heap_rezalloc_aligned_at(mi_heap_t* heap, voi...
function mi_decl_nodiscard (line 331) | mi_decl_nodiscard void* mi_heap_rezalloc_aligned(mi_heap_t* heap, void* ...
function mi_decl_nodiscard (line 335) | mi_decl_nodiscard void* mi_heap_recalloc_aligned_at(mi_heap_t* heap, voi...
function mi_decl_nodiscard (line 341) | mi_decl_nodiscard void* mi_heap_recalloc_aligned(mi_heap_t* heap, void* ...
function mi_decl_nodiscard (line 347) | mi_decl_nodiscard void* mi_realloc_aligned_at(void* p, size_t newsize, s...
function mi_decl_nodiscard (line 351) | mi_decl_nodiscard void* mi_realloc_aligned(void* p, size_t newsize, size...
function mi_decl_nodiscard (line 355) | mi_decl_nodiscard void* mi_rezalloc_aligned_at(void* p, size_t newsize, ...
function mi_decl_nodiscard (line 359) | mi_decl_nodiscard void* mi_rezalloc_aligned(void* p, size_t newsize, siz...
function mi_decl_nodiscard (line 363) | mi_decl_nodiscard void* mi_recalloc_aligned_at(void* p, size_t newcount,...
function mi_decl_nodiscard (line 367) | mi_decl_nodiscard void* mi_recalloc_aligned(void* p, size_t newcount, si...
FILE: src/alloc-override.c
function mi_decl_externc (line 60) | mi_decl_externc size_t mi_malloc_size_checked(void *p) {
type mi_interpose_s (line 67) | struct mi_interpose_s {
type mi_interpose_s (line 119) | struct mi_interpose_s
function void (line 167) | void operator delete(void* p) noexcept MI_FORWARD0(mi_free,p)
function operator (line 183) | void operator delete (void* p, std::align_val_t al) noexcept { mi_free_...
function noexcept (line 184) | void operator delete[](void* p, std::align_val_t al) noexcept { mi_free_...
function operator (line 185) | void operator delete (void* p, std::size_t n, std::align_val_t al) noex...
function noexcept (line 186) | void operator delete[](void* p, std::size_t n, std::align_val_t al) noex...
function operator (line 187) | void operator delete (void* p, std::align_val_t al, const std::nothrow_...
function noexcept (line 188) | void operator delete[](void* p, std::align_val_t al, const std::nothrow_...
function _ZdlPv (line 203) | void _ZdlPv(void* p) MI_FORWARD0(mi_free,p) // delete
function _ZdaPvSt11align_val_t (line 209) | void _ZdaPvSt11align_val_t(void* p, size_t al) { mi_free_alig...
function _ZdlPvmSt11align_val_t (line 210) | void _ZdlPvmSt11align_val_t(void* p, size_t n, size_t al) { mi_free_size...
function _ZdaPvmSt11align_val_t (line 211) | void _ZdaPvmSt11align_val_t(void* p, size_t n, size_t al) { mi_free_size...
function _ZdlPvRKSt9nothrow_t (line 213) | void _ZdlPvRKSt9nothrow_t(void* p, mi_nothrow_t tag) { MI_UNUSED(ta...
function _ZdaPvRKSt9nothrow_t (line 214) | void _ZdaPvRKSt9nothrow_t(void* p, mi_nothrow_t tag) { MI_UNUSED(ta...
function _ZdlPvSt11align_val_tRKSt9nothrow_t (line 215) | void _ZdlPvSt11align_val_tRKSt9nothrow_t(void* p, size_t al, mi_nothrow_...
function _ZdaPvSt11align_val_tRKSt9nothrow_t (line 216) | void _ZdaPvSt11align_val_tRKSt9nothrow_t(void* p, size_t al, mi_nothrow_...
function vfree (line 261) | void vfree(void* p) { mi_free(p); }
function malloc_good_size (line 262) | size_t malloc_good_size(size_t size) { return mi_malloc_good_size(si...
function posix_memalign (line 263) | int posix_memalign(void** p, size_t alignment, size_t size) { return ...
function cfree (line 278) | void cfree(void* p) { mi_free(p); }
function mi_decl_weak (line 284) | mi_decl_weak int reallocarr(void* p, size_t count, size_t size) { ret...
function __posix_memalign (line 305) | int __posix_memalign(void** p, size_t alignment, size_t size) { return...
FILE: src/alloc-posix.c
function mi_decl_nodiscard (line 35) | mi_decl_nodiscard size_t mi_malloc_size(const void* p) mi_attr_noexcept {
function mi_decl_nodiscard (line 40) | mi_decl_nodiscard size_t mi_malloc_usable_size(const void *p) mi_attr_no...
function mi_decl_nodiscard (line 45) | mi_decl_nodiscard size_t mi_malloc_good_size(size_t size) mi_attr_noexce...
function mi_cfree (line 49) | void mi_cfree(void* p) mi_attr_noexcept {
function mi_posix_memalign (line 55) | int mi_posix_memalign(void** p, size_t alignment, size_t size) mi_attr_n...
function mi_decl_nodiscard (line 102) | mi_decl_nodiscard void* mi_reallocarray( void* p, size_t count, size_t s...
function mi_decl_nodiscard (line 108) | mi_decl_nodiscard int mi_reallocarr( void* p, size_t count, size_t size ...
function mi_dupenv_s (line 143) | int mi_dupenv_s(char** buf, size_t* size, const char* name) mi_attr_noex...
function mi_wdupenv_s (line 158) | int mi_wdupenv_s(unsigned short** buf, size_t* size, const unsigned shor...
function mi_decl_nodiscard (line 179) | mi_decl_nodiscard void* mi_aligned_offset_recalloc(void* p, size_t newco...
function mi_decl_nodiscard (line 183) | mi_decl_nodiscard void* mi_aligned_recalloc(void* p, size_t newcount, si...
FILE: src/alloc.c
function mi_unlikely (line 61) | mi_unlikely(zero) {
function mi_decl_restrict (line 129) | static inline mi_decl_restrict void* mi_heap_malloc_small_zero(mi_heap_t...
function else (line 175) | else if (huge_alignment==0 && mi_heap_malloc_use_guarded(heap,size)) {
function mi_decl_nodiscard (line 324) | mi_decl_nodiscard void* mi_heap_realloc(mi_heap_t* heap, void* p, size_t...
function mi_decl_nodiscard (line 328) | mi_decl_nodiscard void* mi_heap_reallocn(mi_heap_t* heap, void* p, size_...
function mi_decl_nodiscard (line 336) | mi_decl_nodiscard void* mi_heap_reallocf(mi_heap_t* heap, void* p, size_...
function mi_decl_nodiscard (line 342) | mi_decl_nodiscard void* mi_heap_rezalloc(mi_heap_t* heap, void* p, size_...
function mi_decl_nodiscard (line 346) | mi_decl_nodiscard void* mi_heap_recalloc(mi_heap_t* heap, void* p, size_...
function mi_decl_nodiscard (line 353) | mi_decl_nodiscard void* mi_realloc(void* p, size_t newsize) mi_attr_noex...
function mi_decl_nodiscard (line 357) | mi_decl_nodiscard void* mi_reallocn(void* p, size_t count, size_t size) ...
function mi_decl_nodiscard (line 361) | mi_decl_nodiscard void* mi_urealloc(void* p, size_t newsize, size_t* usa...
function mi_decl_nodiscard (line 366) | mi_decl_nodiscard void* mi_reallocf(void* p, size_t newsize) mi_attr_noe...
function mi_decl_nodiscard (line 370) | mi_decl_nodiscard void* mi_rezalloc(void* p, size_t newsize) mi_attr_noe...
function mi_decl_nodiscard (line 374) | mi_decl_nodiscard void* mi_recalloc(void* p, size_t count, size_t size) ...
function mi_try_new_handler (line 496) | static bool mi_try_new_handler(bool nothrow) {
function std_new_handler_t (line 523) | std_new_handler_t __attribute__((weak)) _ZSt15get_new_handlerv(void) {
function std_new_handler_t (line 526) | static std_new_handler_t mi_get_new_handler(void) {
function std_new_handler_t (line 531) | static std_new_handler_t mi_get_new_handler(void) {
function mi_try_new_handler (line 536) | static bool mi_try_new_handler(bool nothrow) {
function mi_decl_noinline (line 560) | static mi_decl_noinline void* mi_try_new(size_t size, bool nothrow) {
function mi_decl_nodiscard (line 616) | mi_decl_nodiscard void* mi_new_realloc(void* p, size_t newsize) {
function mi_decl_nodiscard (line 624) | mi_decl_nodiscard void* mi_new_reallocn(void* p, size_t newcount, size_t...
function mi_decl_restrict (line 681) | mi_decl_restrict void* _mi_heap_malloc_guarded(mi_heap_t* heap, size_t s...
FILE: src/arena-abandon.c
function mi_arena_segment_os_clear_abandoned (line 51) | static bool mi_arena_segment_os_clear_abandoned(mi_segment_t* segment, b...
function _mi_arena_segment_clear_abandoned (line 94) | bool _mi_arena_segment_clear_abandoned(mi_segment_t* segment) {
function mi_arena_segment_os_mark_abandoned (line 119) | static void mi_arena_segment_os_mark_abandoned(mi_segment_t* segment) {
function _mi_arena_segment_mark_abandoned (line 143) | void _mi_arena_segment_mark_abandoned(mi_segment_t* segment)
function _mi_arena_field_cursor_init (line 172) | void _mi_arena_field_cursor_init(mi_heap_t* heap, mi_subproc_t* subproc,...
function _mi_arena_field_cursor_done (line 202) | void _mi_arena_field_cursor_done(mi_arena_field_cursor_t* current) {
function mi_segment_t (line 209) | static mi_segment_t* mi_arena_segment_clear_abandoned_at(mi_arena_t* are...
function mi_segment_t (line 232) | static mi_segment_t* mi_arena_segment_clear_abandoned_next_field(mi_aren...
function mi_segment_t (line 282) | static mi_segment_t* mi_arena_segment_clear_abandoned_next_list(mi_arena...
function mi_segment_t (line 317) | mi_segment_t* _mi_arena_segment_clear_abandoned_next(mi_arena_field_curs...
function mi_abandoned_visit_blocks (line 329) | bool mi_abandoned_visit_blocks(mi_subproc_id_t subproc_id, int heap_tag,...
FILE: src/arena.c
type mi_arena_t (line 33) | typedef struct mi_arena_s {
function mi_arena_id_index (line 75) | size_t mi_arena_id_index(mi_arena_id_t id) {
function mi_arena_id_t (line 79) | static mi_arena_id_t mi_arena_id_create(size_t arena_index) {
function mi_arena_id_t (line 84) | mi_arena_id_t _mi_arena_id_none(void) {
function mi_arena_id_is_suitable (line 88) | static bool mi_arena_id_is_suitable(mi_arena_id_t arena_id, bool arena_i...
function _mi_arena_memid_is_suitable (line 93) | bool _mi_arena_memid_is_suitable(mi_memid_t memid, mi_arena_id_t request...
function _mi_arena_memid_is_os_allocated (line 102) | bool _mi_arena_memid_is_os_allocated(mi_memid_t memid) {
function mi_arena_get_count (line 106) | size_t mi_arena_get_count(void) {
function mi_arena_t (line 110) | mi_arena_t* mi_arena_from_index(size_t idx) {
function mi_block_count_of_size (line 121) | static size_t mi_block_count_of_size(size_t size) {
function mi_arena_block_size (line 125) | static size_t mi_arena_block_size(size_t bcount) {
function mi_arena_size (line 129) | static size_t mi_arena_size(mi_arena_t* arena) {
function mi_memid_t (line 133) | static mi_memid_t mi_memid_create_arena(mi_arena_id_t id, bool is_exclus...
function mi_arena_memid_indices (line 141) | bool mi_arena_memid_indices(mi_memid_t memid, size_t* arena_index, mi_bi...
function _mi_arena_meta_free (line 201) | void _mi_arena_meta_free(void* p, mi_memid_t memid, size_t size) {
function mi_arena_try_claim (line 220) | static bool mi_arena_try_claim(mi_arena_t* arena, size_t blocks, mi_bitm...
function mi_decl_noinline (line 235) | static mi_decl_noinline void* mi_arena_try_alloc_at(mi_arena_t* arena, s...
function mi_decl_noinline (line 333) | static mi_decl_noinline void* mi_arena_try_alloc(int numa_node, size_t s...
function mi_arena_reserve (line 368) | static bool mi_arena_reserve(size_t req_size, bool allow_large, mi_arena...
function mi_arena_purge_delay (line 467) | static long mi_arena_purge_delay(void) {
function mi_arena_purge (line 474) | static void mi_arena_purge(mi_arena_t* arena, size_t bitmap_idx, size_t ...
function mi_arena_schedule_purge (line 506) | static void mi_arena_schedule_purge(mi_arena_t* arena, size_t bitmap_idx...
function mi_arena_purge_range (line 534) | static bool mi_arena_purge_range(mi_arena_t* arena, size_t idx, size_t s...
function mi_arena_try_purge (line 558) | static bool mi_arena_try_purge(mi_arena_t* arena, mi_msecs_t now, bool f...
function mi_arenas_try_purge (line 617) | static void mi_arenas_try_purge( bool force, bool visit_all )
function _mi_arena_free (line 661) | void _mi_arena_free(void* p, size_t size, size_t committed_size, mi_memi...
function mi_arenas_unsafe_destroy (line 744) | static void mi_arenas_unsafe_destroy(void) {
function _mi_arenas_collect (line 768) | void _mi_arenas_collect(bool force_purge) {
function _mi_arena_unsafe_destroy_all (line 774) | void _mi_arena_unsafe_destroy_all(void) {
function _mi_arena_contains (line 780) | bool _mi_arena_contains(const void* p) {
function mi_arena_add (line 795) | static bool mi_arena_add(mi_arena_t* arena, mi_arena_id_t* arena_id, mi_...
function mi_manage_os_memory_ex2 (line 815) | static bool mi_manage_os_memory_ex2(void* start, size_t size, bool is_la...
function mi_manage_os_memory_ex (line 881) | bool mi_manage_os_memory_ex(void* start, size_t size, bool is_committed,...
function mi_reserve_os_memory_ex (line 890) | int mi_reserve_os_memory_ex(size_t size, bool commit, bool allow_large, ...
function mi_manage_os_memory (line 908) | bool mi_manage_os_memory(void* start, size_t size, bool is_committed, bo...
function mi_reserve_os_memory (line 913) | int mi_reserve_os_memory(size_t size, bool commit, bool allow_large) mi_...
function mi_debug_show_bitmap (line 922) | static size_t mi_debug_show_bitmap(const char* prefix, const char* heade...
function mi_debug_show_arenas (line 946) | void mi_debug_show_arenas(void) mi_attr_noexcept {
function mi_arenas_print (line 975) | void mi_arenas_print(void) mi_attr_noexcept {
function mi_reserve_huge_os_pages_at_ex (line 984) | int mi_reserve_huge_os_pages_at_ex(size_t pages, int numa_node, size_t t...
function mi_reserve_huge_os_pages_at (line 1006) | int mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t time...
function mi_reserve_huge_os_pages_interleave (line 1011) | int mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes,...
function mi_reserve_huge_os_pages (line 1038) | int mi_reserve_huge_os_pages(size_t pages, double max_secs, size_t* page...
FILE: src/bitmap.c
function mi_bitmap_mask_ (line 28) | static inline size_t mi_bitmap_mask_(size_t count, size_t bitidx) {
function _mi_bitmap_try_find_claim_field (line 43) | inline bool _mi_bitmap_try_find_claim_field(mi_bitmap_t bitmap, size_t i...
function _mi_bitmap_try_find_from_claim (line 100) | bool _mi_bitmap_try_find_from_claim(mi_bitmap_t bitmap, const size_t bit...
function _mi_bitmap_try_find_from_claim_pred (line 112) | bool _mi_bitmap_try_find_from_claim_pred(mi_bitmap_t bitmap, const size_...
function _mi_bitmap_unclaim (line 132) | bool _mi_bitmap_unclaim(mi_bitmap_t bitmap, size_t bitmap_fields, size_t...
function _mi_bitmap_claim (line 145) | bool _mi_bitmap_claim(mi_bitmap_t bitmap, size_t bitmap_fields, size_t c...
function mi_bitmap_is_claimedx (line 157) | static bool mi_bitmap_is_claimedx(mi_bitmap_t bitmap, size_t bitmap_fiel...
function _mi_bitmap_try_claim (line 169) | bool _mi_bitmap_try_claim(mi_bitmap_t bitmap, size_t bitmap_fields, size...
function _mi_bitmap_is_claimed (line 184) | bool _mi_bitmap_is_claimed(mi_bitmap_t bitmap, size_t bitmap_fields, siz...
function _mi_bitmap_is_any_claimed (line 188) | bool _mi_bitmap_is_any_claimed(mi_bitmap_t bitmap, size_t bitmap_fields,...
function mi_bitmap_try_find_claim_field_across (line 203) | static bool mi_bitmap_try_find_claim_field_across(mi_bitmap_t bitmap, si...
function _mi_bitmap_try_find_from_claim_across (line 295) | bool _mi_bitmap_try_find_from_claim_across(mi_bitmap_t bitmap, const siz...
function mi_bitmap_mask_across (line 323) | static size_t mi_bitmap_mask_across(mi_bitmap_index_t bitmap_idx, size_t...
function _mi_bitmap_unclaim_across (line 349) | bool _mi_bitmap_unclaim_across(mi_bitmap_t bitmap, size_t bitmap_fields,...
function _mi_bitmap_claim_across (line 372) | bool _mi_bitmap_claim_across(mi_bitmap_t bitmap, size_t bitmap_fields, s...
function mi_bitmap_is_claimedx_across (line 404) | static bool mi_bitmap_is_claimedx_across(mi_bitmap_t bitmap, size_t bitm...
function _mi_bitmap_is_claimed_across (line 433) | bool _mi_bitmap_is_claimed_across(mi_bitmap_t bitmap, size_t bitmap_fiel...
function _mi_bitmap_is_any_claimed_across (line 437) | bool _mi_bitmap_is_any_claimed_across(mi_bitmap_t bitmap, size_t bitmap_...
FILE: src/bitmap.h
type mi_bitmap_field_t (line 31) | typedef _Atomic(size_t) mi_bitmap_field_t;
type mi_bitmap_field_t (line 32) | typedef mi_bitmap_field_t* mi_bitmap_t;
type mi_bitmap_index_t (line 35) | typedef size_t mi_bitmap_index_t;
function mi_bitmap_index_t (line 38) | static inline mi_bitmap_index_t mi_bitmap_index_create_ex(size_t idx, si...
function mi_bitmap_index_t (line 42) | static inline mi_bitmap_index_t mi_bitmap_index_create(size_t idx, size_...
function mi_bitmap_index_t (line 48) | static inline mi_bitmap_index_t mi_bitmap_index_create_from_bit(size_t f...
function mi_bitmap_index_field (line 53) | static inline size_t mi_bitmap_index_field(mi_bitmap_index_t bitmap_idx) {
function mi_bitmap_index_bit_in_field (line 58) | static inline size_t mi_bitmap_index_bit_in_field(mi_bitmap_index_t bitm...
function mi_bitmap_index_bit (line 63) | static inline size_t mi_bitmap_index_bit(mi_bitmap_index_t bitmap_idx) {
FILE: src/free.c
function mi_free_block_local (line 31) | static inline void mi_free_block_local(mi_page_t* page, mi_block_t* bloc...
function mi_block_t (line 59) | mi_block_t* _mi_page_ptr_unalign(const mi_page_t* page, const void* p) {
function mi_block_check_unguard (line 77) | static inline void mi_block_check_unguard(mi_page_t* page, mi_block_t* b...
function mi_block_check_unguard (line 81) | static inline void mi_block_check_unguard(mi_page_t* page, mi_block_t* b...
function mi_free_generic_local (line 87) | static void mi_decl_noinline mi_free_generic_local(mi_page_t* page, mi_s...
function mi_free_generic_mt (line 95) | static void mi_decl_noinline mi_free_generic_mt(mi_page_t* page, mi_segm...
function _mi_free_generic (line 102) | void mi_decl_noinline _mi_free_generic(mi_segment_t* segment, mi_page_t*...
function mi_free_ex (line 151) | static inline void mi_free_ex(void* p, size_t* usable) mi_attr_noexcept
function mi_free (line 177) | void mi_free(void* p) mi_attr_noexcept {
function mi_ufree (line 181) | void mi_ufree(void* p, size_t* usable) mi_attr_noexcept {
function _mi_free_delayed_block (line 186) | bool _mi_free_delayed_block(mi_block_t* block) {
function mi_free_block_delayed_mt (line 218) | static void mi_decl_noinline mi_free_block_delayed_mt( mi_page_t* page, ...
function mi_free_block_mt (line 262) | static void mi_decl_noinline mi_free_block_mt(mi_page_t* page, mi_segmen...
function mi_page_usable_aligned_size_of (line 321) | static size_t mi_decl_noinline mi_page_usable_aligned_size_of(const mi_p...
function mi_page_t (line 335) | static inline mi_page_t* mi_validate_ptr_page(const void* p, const char*...
function _mi_usable_size (line 342) | static inline size_t _mi_usable_size(const void* p, const mi_page_t* pag...
function mi_decl_nodiscard (line 354) | mi_decl_nodiscard size_t mi_usable_size(const void* p) mi_attr_noexcept {
function mi_free_size (line 364) | void mi_free_size(void* p, size_t size) mi_attr_noexcept {
function mi_free_size_aligned (line 374) | void mi_free_size_aligned(void* p, size_t size, size_t alignment) mi_att...
function mi_free_aligned (line 380) | void mi_free_aligned(void* p, size_t alignment) mi_attr_noexcept {
function mi_list_contains (line 394) | static bool mi_list_contains(const mi_page_t* page, const mi_block_t* li...
function mi_decl_noinline (line 402) | static mi_decl_noinline bool mi_check_is_double_freex(const mi_page_t* p...
function mi_check_is_double_free (line 417) | static inline bool mi_check_is_double_free(const mi_page_t* page, const ...
function mi_check_is_double_free (line 430) | static inline bool mi_check_is_double_free(const mi_page_t* page, const ...
function mi_page_decode_padding (line 443) | static bool mi_page_decode_padding(const mi_page_t* page, const mi_block...
function mi_page_usable_size_of (line 458) | static size_t mi_page_usable_size_of(const mi_page_t* page, const mi_blo...
function _mi_padding_shrink (line 470) | void _mi_padding_shrink(const mi_page_t* page, const mi_block_t* block, ...
function mi_page_usable_size_of (line 486) | static size_t mi_page_usable_size_of(const mi_page_t* page, const mi_blo...
function _mi_padding_shrink (line 491) | void _mi_padding_shrink(const mi_page_t* page, const mi_block_t* block, ...
function mi_verify_padding (line 500) | static bool mi_verify_padding(const mi_page_t* page, const mi_block_t* b...
function mi_check_padding (line 524) | static void mi_check_padding(const mi_page_t* page, const mi_block_t* bl...
function mi_check_padding (line 534) | static void mi_check_padding(const mi_page_t* page, const mi_block_t* bl...
function mi_stat_free (line 543) | static void mi_stat_free(const mi_page_t* page, const mi_block_t* block) {
function mi_stat_free (line 565) | static void mi_stat_free(const mi_page_t* page, const mi_block_t* block) {
function mi_block_unguard (line 573) | static void mi_block_unguard(mi_page_t* page, mi_block_t* block, void* p) {
FILE: src/heap.c
function mi_heap_visit_pages (line 27) | static bool mi_heap_visit_pages(mi_heap_t* heap, heap_page_visitor_fun* ...
function mi_heap_page_is_valid (line 56) | static bool mi_heap_page_is_valid(mi_heap_t* heap, mi_page_queue_t* pq, ...
function mi_heap_is_valid (line 68) | static bool mi_heap_is_valid(mi_heap_t* heap) {
type mi_collect_t (line 85) | typedef enum mi_collect_e {
function mi_heap_page_collect (line 92) | static bool mi_heap_page_collect(mi_heap_t* heap, mi_page_queue_t* pq, m...
function mi_heap_page_never_delayed_free (line 115) | static bool mi_heap_page_never_delayed_free(mi_heap_t* heap, mi_page_que...
function mi_heap_collect_ex (line 124) | static void mi_heap_collect_ex(mi_heap_t* heap, mi_collect_t collect)
function _mi_heap_collect_abandon (line 182) | void _mi_heap_collect_abandon(mi_heap_t* heap) {
function mi_heap_collect (line 186) | void mi_heap_collect(mi_heap_t* heap, bool force) mi_attr_noexcept {
function mi_collect (line 190) | void mi_collect(bool force) mi_attr_noexcept {
function mi_heap_t (line 199) | mi_heap_t* mi_heap_get_default(void) {
function mi_heap_is_default (line 204) | static bool mi_heap_is_default(const mi_heap_t* heap) {
function mi_heap_t (line 209) | mi_heap_t* mi_heap_get_backing(void) {
function _mi_heap_init (line 218) | void _mi_heap_init(mi_heap_t* heap, mi_tld_t* tld, mi_arena_id_t arena_i...
function mi_decl_nodiscard (line 244) | mi_decl_nodiscard mi_heap_t* mi_heap_new_ex(int heap_tag, bool allow_des...
function mi_decl_nodiscard (line 253) | mi_decl_nodiscard mi_heap_t* mi_heap_new_in_arena(mi_arena_id_t arena_id) {
function mi_decl_nodiscard (line 257) | mi_decl_nodiscard mi_heap_t* mi_heap_new(void) {
function _mi_heap_memid_is_suitable (line 262) | bool _mi_heap_memid_is_suitable(mi_heap_t* heap, mi_memid_t memid) {
function _mi_heap_random_next (line 266) | uintptr_t _mi_heap_random_next(mi_heap_t* heap) {
function mi_heap_reset_pages (line 271) | static void mi_heap_reset_pages(mi_heap_t* heap) {
function mi_heap_free (line 282) | static void mi_heap_free(mi_heap_t* heap) {
function mi_heap_t (line 313) | mi_heap_t* _mi_heap_by_tag(mi_heap_t* heap, uint8_t tag) {
function _mi_heap_page_destroy (line 329) | static bool _mi_heap_page_destroy(mi_heap_t* heap, mi_page_queue_t* pq, ...
function _mi_heap_destroy_pages (line 374) | void _mi_heap_destroy_pages(mi_heap_t* heap) {
function mi_heap_track_block_free (line 380) | static bool mi_cdecl mi_heap_track_block_free(const mi_heap_t* heap, con...
function mi_heap_destroy (line 387) | void mi_heap_destroy(mi_heap_t* heap) {
function _mi_heap_unsafe_destroy_all (line 416) | void _mi_heap_unsafe_destroy_all(mi_heap_t* heap) {
function mi_heap_absorb (line 437) | static void mi_heap_absorb(mi_heap_t* heap, mi_heap_t* from) {
function mi_heaps_are_compatible (line 471) | static bool mi_heaps_are_compatible(mi_heap_t* heap1, mi_heap_t* heap2) {
function mi_heap_delete (line 477) | void mi_heap_delete(mi_heap_t* heap)
function mi_heap_t (line 497) | mi_heap_t* mi_heap_set_default(mi_heap_t* heap) {
function mi_heap_t (line 515) | static mi_heap_t* mi_heap_of_block(const void* p) {
function mi_heap_contains_block (line 524) | bool mi_heap_contains_block(mi_heap_t* heap, const void* p) {
function mi_heap_page_check_owned (line 531) | static bool mi_heap_page_check_owned(mi_heap_t* heap, mi_page_queue_t* p...
function mi_heap_check_owned (line 541) | bool mi_heap_check_owned(mi_heap_t* heap, const void* p) {
function mi_check_owned (line 550) | bool mi_check_owned(const void* p) {
function _mi_heap_area_init (line 560) | void _mi_heap_area_init(mi_heap_area_t* area, mi_page_t* page) {
function mi_get_fast_divisor (line 573) | static void mi_get_fast_divisor(size_t divisor, uint64_t* magic, size_t*...
function mi_fast_divide (line 579) | static size_t mi_fast_divide(size_t n, uint64_t magic, size_t shift) {
function _mi_heap_area_visit_blocks (line 585) | bool _mi_heap_area_visit_blocks(const mi_heap_area_t* area, mi_page_t* p...
type mi_heap_area_ex_t (line 692) | typedef struct mi_heap_area_ex_s {
function mi_heap_visit_areas_page (line 699) | static bool mi_heap_visit_areas_page(mi_heap_t* heap, mi_page_queue_t* p...
function mi_heap_visit_areas (line 710) | static bool mi_heap_visit_areas(const mi_heap_t* heap, mi_heap_area_visi...
type mi_visit_blocks_args_t (line 716) | typedef struct mi_visit_blocks_args_s {
function mi_heap_area_visitor (line 722) | static bool mi_heap_area_visitor(const mi_heap_t* heap, const mi_heap_ar...
function mi_heap_visit_blocks (line 734) | bool mi_heap_visit_blocks(const mi_heap_t* heap, bool visit_blocks, mi_b...
FILE: src/init.c
function mi_threadid_t (line 145) | mi_threadid_t _mi_thread_id(void) mi_attr_noexcept {
function mi_decl_export (line 187) | mi_decl_export void mi_heap_guarded_set_sample_rate(mi_heap_t* heap, siz...
function mi_decl_export (line 198) | mi_decl_export void mi_heap_guarded_set_size_bound(mi_heap_t* heap, size...
function _mi_heap_guarded_init (line 203) | void _mi_heap_guarded_init(mi_heap_t* heap) {
function mi_decl_export (line 212) | mi_decl_export void mi_heap_guarded_set_sample_rate(mi_heap_t* heap, siz...
function mi_decl_export (line 216) | mi_decl_export void mi_heap_guarded_set_size_bound(mi_heap_t* heap, size...
function _mi_heap_guarded_init (line 219) | void _mi_heap_guarded_init(mi_heap_t* heap) {
function mi_heap_main_init (line 225) | static void mi_heap_main_init(void) {
function mi_heap_t (line 243) | mi_heap_t* _mi_heap_main_get(void) {
function mi_subproc_id_t (line 252) | mi_subproc_id_t mi_subproc_main(void) {
function mi_subproc_id_t (line 256) | mi_subproc_id_t mi_subproc_new(void) {
function mi_subproc_t (line 267) | mi_subproc_t* _mi_subproc_from_id(mi_subproc_id_t subproc_id) {
function mi_subproc_delete (line 271) | void mi_subproc_delete(mi_subproc_id_t subproc_id) {
function mi_subproc_add_current_thread (line 289) | void mi_subproc_add_current_thread(mi_subproc_id_t subproc_id) {
type mi_thread_data_t (line 304) | typedef struct mi_thread_data_s {
function mi_thread_data_t (line 319) | static mi_thread_data_t* mi_thread_data_zalloc(void) {
function mi_thread_data_free (line 350) | static void mi_thread_data_free( mi_thread_data_t* tdfree ) {
function _mi_thread_data_collect (line 365) | void _mi_thread_data_collect(void) {
function _mi_thread_heap_init (line 379) | static bool _mi_thread_heap_init(void) {
function _mi_tld_init (line 403) | void _mi_tld_init(mi_tld_t* tld, mi_heap_t* bheap) {
function _mi_thread_heap_done (line 412) | static bool _mi_thread_heap_done(mi_heap_t* heap) {
function mi_process_setup_auto_thread_done (line 481) | static void mi_process_setup_auto_thread_done(void) {
function _mi_is_main_thread (line 490) | bool _mi_is_main_thread(void) {
function _mi_current_thread_count (line 496) | size_t _mi_current_thread_count(void) {
function mi_thread_init (line 501) | void mi_thread_init(void) mi_attr_noexcept
function mi_thread_done (line 516) | void mi_thread_done(void) mi_attr_noexcept {
function _mi_thread_done (line 520) | void _mi_thread_done(mi_heap_t* heap)
function _mi_heap_set_default_direct (line 544) | void _mi_heap_set_default_direct(mi_heap_t* heap) {
function mi_thread_set_in_threadpool (line 561) | void mi_thread_set_in_threadpool(void) mi_attr_noexcept {
function _mi_preloading (line 571) | _mi_preloading(void) {
function mi_decl_nodiscard (line 576) | mi_decl_nodiscard bool mi_is_redirected(void) mi_attr_noexcept {
function _mi_auto_process_init (line 581) | void _mi_auto_process_init(void) {
function mi_detect_cpu_features (line 610) | static void mi_detect_cpu_features(void) {
function mi_detect_cpu_features (line 619) | static void mi_detect_cpu_features(void) {
function mi_process_init (line 625) | void mi_process_init(void) mi_attr_noexcept {
function mi_process_done (line 669) | void mi_cdecl mi_process_done(void) mi_attr_noexcept {
function _mi_auto_process_done (line 712) | void mi_cdecl _mi_auto_process_done(void) mi_attr_noexcept {
FILE: src/libc.c
function _mi_toupper (line 19) | char _mi_toupper(char c) {
function _mi_strnicmp (line 24) | int _mi_strnicmp(const char* s, const char* t, size_t n) {
function _mi_strlcpy (line 32) | void _mi_strlcpy(char* dest, const char* src, size_t dest_size) {
function _mi_strlcat (line 43) | void _mi_strlcat(char* dest, const char* src, size_t dest_size) {
function _mi_strlen (line 54) | size_t _mi_strlen(const char* s) {
function _mi_strnlen (line 61) | size_t _mi_strnlen(const char* s, size_t max_len) {
function _mi_getenv (line 69) | bool _mi_getenv(const char* name, char* result, size_t result_size) {
function _mi_getenv (line 76) | bool _mi_getenv(const char* name, char* result, size_t result_size) {
function mi_outc (line 95) | static void mi_outc(char c, char** out, char* end) {
function mi_outs (line 102) | static void mi_outs(const char* s, char** out, char* end) {
function mi_out_fill (line 111) | static void mi_out_fill(char fill, size_t len, char** out, char* end) {
function mi_out_alignright (line 119) | static void mi_out_alignright(char fill, char* start, size_t len, size_t...
function mi_out_num (line 133) | static void mi_out_num(uintmax_t x, size_t base, char prefix, char** out...
function _mi_vsnprintf (line 163) | int _mi_vsnprintf(char* buf, size_t bufsize, const char* fmt, va_list ar...
function _mi_snprintf (line 271) | int _mi_snprintf(char* buf, size_t buflen, const char* fmt, ...) {
function mi_byte_sum32 (line 286) | static size_t mi_byte_sum32(uint32_t x) {
function mi_popcount_generic32 (line 293) | static size_t mi_popcount_generic32(uint32_t x) {
function mi_decl_noinline (line 306) | mi_decl_noinline size_t _mi_popcount_generic(size_t x) {
function mi_byte_sum64 (line 316) | static size_t mi_byte_sum64(uint64_t x) {
function mi_popcount_generic64 (line 323) | static size_t mi_popcount_generic64(uint64_t x) {
function mi_decl_noinline (line 330) | mi_decl_noinline size_t _mi_popcount_generic(size_t x) {
FILE: src/options.c
function mi_version (line 22) | int mi_version(void) mi_attr_noexcept {
type mi_init_t (line 33) | typedef enum mi_init_e {
type mi_option_desc_t (line 39) | typedef struct mi_option_desc_s {
function mi_option_has_size_in_kib (line 177) | static bool mi_option_has_size_in_kib(mi_option_t option) {
function _mi_options_init (line 181) | void _mi_options_init(void) {
function mi_options_print (line 204) | void mi_options_print(void) mi_attr_noexcept
function _mi_option_get_fast (line 244) | long _mi_option_get_fast(mi_option_t option) {
function mi_option_get (line 253) | mi_decl_nodiscard long mi_option_get(mi_option_t option) {
function mi_option_get_clamp (line 264) | mi_decl_nodiscard long mi_option_get_clamp(mi_option_t option, long min,...
function mi_decl_nodiscard (line 269) | mi_decl_nodiscard size_t mi_option_get_size(mi_option_t option) {
function mi_option_set (line 278) | void mi_option_set(mi_option_t option, long value) {
function mi_option_set_default (line 294) | void mi_option_set_default(mi_option_t option, long value) {
function mi_decl_nodiscard (line 303) | mi_decl_nodiscard bool mi_option_is_enabled(mi_option_t option) {
function mi_option_set_enabled (line 307) | void mi_option_set_enabled(mi_option_t option, bool enable) {
function mi_option_set_enabled_default (line 311) | void mi_option_set_enabled_default(mi_option_t option, bool enable) {
function mi_option_enable (line 315) | void mi_option_enable(mi_option_t option) {
function mi_option_disable (line 319) | void mi_option_disable(mi_option_t option) {
function mi_out_stderr (line 323) | static void mi_cdecl mi_out_stderr(const char* msg, void* arg) {
function mi_out_buf (line 340) | static void mi_cdecl mi_out_buf(const char* msg, void* arg) {
function mi_out_buf_flush (line 356) | static void mi_out_buf_flush(mi_output_fun* out, bool no_more_buf, void*...
function mi_out_buf_stderr (line 372) | static void mi_cdecl mi_out_buf_stderr(const char* msg, void* arg) {
function mi_output_fun (line 388) | static mi_output_fun* mi_out_get_default(void** parg) {
function mi_register_output (line 394) | void mi_register_output(mi_output_fun* out, void* arg) mi_attr_noexcept {
function mi_add_stderr_output (line 401) | static void mi_add_stderr_output(void) {
function mi_decl_noinline (line 424) | static mi_decl_noinline bool mi_recurse_enter_prim(void) {
function mi_decl_noinline (line 430) | static mi_decl_noinline void mi_recurse_exit_prim(void) {
function mi_recurse_enter (line 434) | static bool mi_recurse_enter(void) {
function mi_recurse_exit (line 441) | static void mi_recurse_exit(void) {
function _mi_fputs (line 448) | void _mi_fputs(mi_output_fun* out, void* arg, const char* prefix, const ...
function mi_vfprintf (line 464) | static void mi_vfprintf( mi_output_fun* out, void* arg, const char* pref...
function _mi_fprintf (line 473) | void _mi_fprintf( mi_output_fun* out, void* arg, const char* fmt, ... ) {
function mi_vfprintf_thread (line 480) | static void mi_vfprintf_thread(mi_output_fun* out, void* arg, const char...
function _mi_message (line 491) | void _mi_message(const char* fmt, ...) {
function _mi_trace_message (line 498) | void _mi_trace_message(const char* fmt, ...) {
function _mi_verbose_message (line 506) | void _mi_verbose_message(const char* fmt, ...) {
function mi_show_error_message (line 514) | static void mi_show_error_message(const char* fmt, va_list args) {
function _mi_warning_message (line 522) | void _mi_warning_message(const char* fmt, ...) {
function _mi_assert_fail (line 535) | void _mi_assert_fail(const char* assertion, const char* fname, unsigned ...
function mi_error_default (line 548) | static void mi_error_default(int err) {
function mi_register_error (line 570) | void mi_register_error(mi_error_fun* fun, void* arg) {
function _mi_error_message (line 575) | void _mi_error_message(int err, const char* fmt, ...) {
function mi_option_init (line 599) | static void mi_option_init(mi_option_desc_t* desc) {
FILE: src/os.c
function _mi_os_has_overcommit (line 46) | bool _mi_os_has_overcommit(void) {
function _mi_os_has_virtual_reserve (line 50) | bool _mi_os_has_virtual_reserve(void) {
function _mi_os_page_size (line 56) | size_t _mi_os_page_size(void) {
function _mi_os_large_page_size (line 61) | size_t _mi_os_large_page_size(void) {
function _mi_os_canuse_large_page (line 65) | bool _mi_os_canuse_large_page(size_t size, size_t alignment) {
function _mi_os_good_alloc_size (line 72) | size_t _mi_os_good_alloc_size(size_t size) {
function _mi_os_init (line 83) | void _mi_os_init(void) {
function mi_os_prim_free (line 153) | static void mi_os_prim_free(void* addr, size_t size, size_t commit_size) {
function _mi_os_free_ex (line 166) | void _mi_os_free_ex(void* addr, size_t size, bool still_committed, mi_me...
function _mi_os_free (line 200) | void _mi_os_free(void* p, size_t size, mi_memid_t memid) {
function mi_decl_nodiscard (line 363) | mi_decl_nodiscard static void* mi_os_ensure_zero(void* p, size_t size, m...
function _mi_os_commit_ex (line 449) | bool _mi_os_commit_ex(void* addr, size_t size, bool* is_zero, size_t sta...
function _mi_os_commit (line 478) | bool _mi_os_commit(void* addr, size_t size, bool* is_zero) {
function mi_os_decommit_ex (line 482) | static bool mi_os_decommit_ex(void* addr, size_t size, bool* needs_recom...
function _mi_os_decommit (line 501) | bool _mi_os_decommit(void* addr, size_t size) {
function _mi_os_reset (line 511) | bool _mi_os_reset(void* addr, size_t size) {
function _mi_os_reuse (line 531) | void _mi_os_reuse( void* addr, size_t size ) {
function _mi_os_purge_ex (line 544) | bool _mi_os_purge_ex(void* p, size_t size, bool allow_reset, size_t stat...
function _mi_os_purge (line 567) | bool _mi_os_purge(void* p, size_t size) {
function mi_os_protectx (line 572) | static bool mi_os_protectx(void* addr, size_t size, bool protect) {
function _mi_os_protect (line 589) | bool _mi_os_protect(void* addr, size_t size) {
function _mi_os_unprotect (line 593) | bool _mi_os_unprotect(void* addr, size_t size) {
function mi_os_free_huge_os_pages (line 717) | static void mi_os_free_huge_os_pages(void* p, size_t size) {
function _mi_os_numa_node_count (line 734) | int _mi_os_numa_node_count(void) {
function mi_os_numa_node_get (line 753) | static int mi_os_numa_node_get(void) {
function _mi_os_numa_node (line 763) | int _mi_os_numa_node(void) {
FILE: src/page-queue.c
function mi_page_queue_is_huge (line 40) | static inline bool mi_page_queue_is_huge(const mi_page_queue_t* pq) {
function mi_page_queue_is_full (line 44) | static inline bool mi_page_queue_is_full(const mi_page_queue_t* pq) {
function mi_page_queue_is_special (line 48) | static inline bool mi_page_queue_is_special(const mi_page_queue_t* pq) {
function mi_bin (line 60) | static inline size_t mi_bin(size_t size) {
function _mi_bin (line 100) | size_t _mi_bin(size_t size) {
function _mi_bin_size (line 104) | size_t _mi_bin_size(size_t bin) {
function mi_good_size (line 109) | size_t mi_good_size(size_t size) mi_attr_noexcept {
function mi_page_queue_contains (line 119) | static bool mi_page_queue_contains(mi_page_queue_t* queue, const mi_page...
function mi_heap_contains_queue (line 134) | static bool mi_heap_contains_queue(const mi_heap_t* heap, const mi_page_...
function mi_page_is_large_or_huge (line 139) | static inline bool mi_page_is_large_or_huge(const mi_page_t* page) {
function mi_page_bin (line 143) | static size_t mi_page_bin(const mi_page_t* page) {
function _mi_page_stats_bin (line 150) | size_t _mi_page_stats_bin(const mi_page_t* page) {
function mi_page_queue_t (line 156) | static mi_page_queue_t* mi_heap_page_queue_of(mi_heap_t* heap, const mi_...
function mi_page_queue_t (line 166) | static mi_page_queue_t* mi_page_queue_of(const mi_page_t* page) {
function mi_heap_queue_first_update (line 178) | static inline void mi_heap_queue_first_update(mi_heap_t* heap, const mi_...
function mi_page_queue_remove (line 221) | static void mi_page_queue_remove(mi_page_queue_t* queue, mi_page_t* page) {
function mi_page_queue_push (line 246) | static void mi_page_queue_push(mi_heap_t* heap, mi_page_queue_t* queue, ...
function mi_page_queue_move_to_front (line 274) | static void mi_page_queue_move_to_front(mi_heap_t* heap, mi_page_queue_t...
function mi_page_queue_enqueue_from_ex (line 283) | static void mi_page_queue_enqueue_from_ex(mi_page_queue_t* to, mi_page_q...
function mi_page_queue_enqueue_from (line 352) | static void mi_page_queue_enqueue_from(mi_page_queue_t* to, mi_page_queu...
function mi_page_queue_enqueue_from_full (line 356) | static void mi_page_queue_enqueue_from_full(mi_page_queue_t* to, mi_page...
function _mi_page_queue_append (line 362) | size_t _mi_page_queue_append(mi_heap_t* heap, mi_page_queue_t* pq, mi_pa...
FILE: src/page.c
function mi_block_t (line 32) | static inline mi_block_t* mi_page_block_at(const mi_page_t* page, void* ...
function mi_page_list_count (line 43) | static size_t mi_page_list_count(mi_page_t* page, mi_block_t* head) {
function mi_page_list_is_valid (line 60) | static bool mi_page_list_is_valid(mi_page_t* page, mi_block_t* p) {
function mi_page_is_valid_init (line 80) | static bool mi_page_is_valid_init(mi_page_t* page) {
function _mi_page_is_valid (line 117) | bool _mi_page_is_valid(mi_page_t* page) {
function _mi_page_use_delayed_free (line 140) | void _mi_page_use_delayed_free(mi_page_t* page, mi_delayed_t delay, bool...
function _mi_page_try_use_delayed_free (line 146) | bool _mi_page_try_use_delayed_free(mi_page_t* page, mi_delayed_t delay, ...
function _mi_page_thread_free_collect (line 181) | static void _mi_page_thread_free_collect(mi_page_t* page)
function _mi_page_free_collect (line 217) | void _mi_page_free_collect(mi_page_t* page, bool force) {
function _mi_page_reclaim (line 257) | void _mi_page_reclaim(mi_heap_t* heap, mi_page_t* page) {
function mi_page_t (line 273) | static mi_page_t* mi_page_fresh_alloc(mi_heap_t* heap, mi_page_queue_t* ...
function mi_page_t (line 301) | static mi_page_t* mi_page_fresh(mi_heap_t* heap, mi_page_queue_t* pq) {
function _mi_heap_delayed_free_all (line 314) | void _mi_heap_delayed_free_all(mi_heap_t* heap) {
function _mi_heap_delayed_free_partial (line 321) | bool _mi_heap_delayed_free_partial(mi_heap_t* heap) {
function _mi_page_unfull (line 351) | void _mi_page_unfull(mi_page_t* page) {
function mi_page_to_full (line 365) | static void mi_page_to_full(mi_page_t* page, mi_page_queue_t* pq) {
function _mi_page_abandon (line 380) | void _mi_page_abandon(mi_page_t* page, mi_page_queue_t* pq) {
function _mi_page_force_abandon (line 409) | void _mi_page_force_abandon(mi_page_t* page) {
function _mi_page_free (line 432) | void _mi_page_free(mi_page_t* page, mi_page_queue_t* pq, bool force) {
function _mi_page_retire (line 462) | void _mi_page_retire(mi_page_t* page) mi_attr_noexcept {
function _mi_heap_collect_retired (line 498) | void _mi_heap_collect_retired(mi_heap_t* heap, bool force) {
function mi_page_free_list_extend_secure (line 536) | static void mi_page_free_list_extend_secure(mi_heap_t* const heap, mi_pa...
function mi_decl_noinline (line 593) | static mi_decl_noinline void mi_page_free_list_extend( mi_page_t* const ...
function mi_page_extend_free (line 635) | static bool mi_page_extend_free(mi_heap_t* heap, mi_page_t* page, mi_tld...
function mi_page_init (line 679) | static void mi_page_init(mi_heap_t* heap, mi_page_t* page, size_t block_...
function mi_page_is_expandable (line 745) | static bool mi_page_is_expandable(const mi_page_t* page) {
function mi_page_t (line 753) | static mi_page_t* mi_page_queue_find_free_ex(mi_heap_t* heap, mi_page_qu...
function mi_page_t (line 859) | static inline mi_page_t* mi_find_free_page(mi_heap_t* heap, size_t size) {
function _mi_deferred_free (line 896) | void _mi_deferred_free(mi_heap_t* heap, bool force) {
function mi_register_deferred_free (line 905) | void mi_register_deferred_free(mi_deferred_free_fun* fn, void* arg) mi_a...
function mi_page_t (line 919) | static mi_page_t* mi_large_huge_page_alloc(mi_heap_t* heap, size_t size,...
function mi_page_t (line 963) | static mi_page_t* mi_find_page(mi_heap_t* heap, size_t size, size_t huge...
FILE: src/prim/emscripten/prim.c
function _mi_prim_mem_init (line 50) | void _mi_prim_mem_init( mi_os_mem_config_t* config) {
function _mi_prim_free (line 60) | int _mi_prim_free(void* addr, size_t size) {
function _mi_prim_alloc (line 74) | int _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, b...
function _mi_prim_commit (line 99) | int _mi_prim_commit(void* addr, size_t size, bool* is_zero) {
function _mi_prim_decommit (line 106) | int _mi_prim_decommit(void* addr, size_t size, bool* needs_recommit) {
function _mi_prim_reset (line 112) | int _mi_prim_reset(void* addr, size_t size) {
function _mi_prim_reuse (line 117) | int _mi_prim_reuse(void* addr, size_t size) {
function _mi_prim_protect (line 122) | int _mi_prim_protect(void* addr, size_t size, bool protect) {
function _mi_prim_alloc_huge_os_pages (line 132) | int _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_...
function _mi_prim_numa_node (line 139) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 143) | size_t _mi_prim_numa_node_count(void) {
function mi_msecs_t (line 154) | mi_msecs_t _mi_prim_clock_now(void) {
function _mi_prim_process_info (line 163) | void _mi_prim_process_info(mi_process_info_t* pinfo)
function _mi_prim_out_stderr (line 176) | void _mi_prim_out_stderr( const char* msg) {
function _mi_prim_getenv (line 185) | bool _mi_prim_getenv(const char* name, char* result, size_t result_size) {
function _mi_prim_random_buf (line 198) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function mi_pthread_done (line 214) | static void mi_pthread_done(void* value) {
function _mi_prim_thread_init_auto_done (line 220) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 225) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 229) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
function _mi_prim_thread_init_auto_done (line 237) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 241) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 245) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
FILE: src/prim/osx/alloc-override-zone.c
function zone_size (line 44) | static size_t zone_size(malloc_zone_t* zone, const void* p) {
function zone_free (line 65) | static void zone_free(malloc_zone_t* zone, void* p) {
function zone_destroy (line 80) | static void zone_destroy(malloc_zone_t* zone) {
function zone_batch_malloc (line 85) | static unsigned zone_batch_malloc(malloc_zone_t* zone, size_t size, void...
function zone_batch_free (line 94) | static void zone_batch_free(malloc_zone_t* zone, void** ps, unsigned cou...
function zone_pressure_relief (line 101) | static size_t zone_pressure_relief(malloc_zone_t* zone, size_t size) {
function zone_free_definite_size (line 107) | static void zone_free_definite_size(malloc_zone_t* zone, void* p, size_t...
function boolean_t (line 112) | static boolean_t zone_claimed_address(malloc_zone_t* zone, void* p) {
function kern_return_t (line 122) | static kern_return_t intro_enumerator(task_t task, void* p,
function intro_good_size (line 133) | static size_t intro_good_size(malloc_zone_t* zone, size_t size) {
function boolean_t (line 138) | static boolean_t intro_check(malloc_zone_t* zone) {
function intro_print (line 143) | static void intro_print(malloc_zone_t* zone, boolean_t verbose) {
function intro_log (line 148) | static void intro_log(malloc_zone_t* zone, void* p) {
function intro_force_lock (line 153) | static void intro_force_lock(malloc_zone_t* zone) {
function intro_force_unlock (line 158) | static void intro_force_unlock(malloc_zone_t* zone) {
function intro_statistics (line 163) | static void intro_statistics(malloc_zone_t* zone, malloc_statistics_t* s...
function boolean_t (line 172) | static boolean_t intro_zone_locked(malloc_zone_t* zone) {
function malloc_zone_t (line 256) | static inline malloc_zone_t* mi_get_default_zone(void)
function malloc_zone_t (line 272) | static malloc_zone_t* mi_malloc_create_zone(vm_size_t size, unsigned fla...
function malloc_zone_t (line 277) | static malloc_zone_t* mi_malloc_default_zone (void) {
function malloc_zone_t (line 281) | static malloc_zone_t* mi_malloc_default_purgeable_zone(void) {
function mi_malloc_destroy_zone (line 285) | static void mi_malloc_destroy_zone(malloc_zone_t* zone) {
function kern_return_t (line 290) | static kern_return_t mi_malloc_get_all_zones (task_t task, memory_reader...
function mi_malloc_set_zone_name (line 301) | static void mi_malloc_set_zone_name(malloc_zone_t* zone, const char* nam...
function mi_malloc_jumpstart (line 305) | static int mi_malloc_jumpstart(uintptr_t cookie) {
function mi__malloc_fork_prepare (line 310) | static void mi__malloc_fork_prepare(void) {
function mi__malloc_fork_parent (line 313) | static void mi__malloc_fork_parent(void) {
function mi__malloc_fork_child (line 316) | static void mi__malloc_fork_child(void) {
function mi_malloc_printf (line 320) | static void mi_malloc_printf(const char* fmt, ...) {
function zone_check (line 324) | static bool zone_check(malloc_zone_t* zone) {
function malloc_zone_t (line 329) | static malloc_zone_t* zone_from_ptr(const void* p) {
function zone_log (line 334) | static void zone_log(malloc_zone_t* zone, void* p) {
function zone_print (line 338) | static void zone_print(malloc_zone_t* zone, bool b) {
function zone_print_ptr_info (line 342) | static void zone_print_ptr_info(void* p) {
function zone_register (line 346) | static void zone_register(malloc_zone_t* zone) {
function zone_unregister (line 350) | static void zone_unregister(malloc_zone_t* zone) {
type mi_interpose_s (line 356) | struct mi_interpose_s {
type mi_interpose_s (line 363) | struct mi_interpose_s
function malloc_zone_t (line 405) | static inline malloc_zone_t* mi_get_default_zone(void)
function _mi_macos_override_malloc (line 421) | __attribute__((constructor(101))) // highest priority
FILE: src/prim/prim.c
function mi_process_attach (line 41) | mi_process_attach(void) {
function mi_process_detach (line 44) | mi_process_detach(void) {
function mi_init_done_t (line 50) | struct mi_init_done_t {
function _mi_is_redirected (line 66) | bool _mi_is_redirected(void) {
function _mi_allocator_init (line 69) | bool _mi_allocator_init(const char** message) {
function _mi_allocator_done (line 73) | void _mi_allocator_done(void) {
FILE: src/prim/unix/prim.c
function mi_prim_open (line 86) | static inline int mi_prim_open(const char* fpath, int open_flags) {
function mi_prim_read (line 89) | static inline ssize_t mi_prim_read(int fd, void* buf, size_t bufsize) {
function mi_prim_close (line 92) | static inline int mi_prim_close(int fd) {
function mi_prim_access (line 95) | static inline int mi_prim_access(const char *fpath, int mode) {
function mi_prim_open (line 101) | static inline int mi_prim_open(const char* fpath, int open_flags) {
function mi_prim_read (line 104) | static inline ssize_t mi_prim_read(int fd, void* buf, size_t bufsize) {
function mi_prim_close (line 107) | static inline int mi_prim_close(int fd) {
function mi_prim_access (line 110) | static inline int mi_prim_access(const char *fpath, int mode) {
function unix_detect_overcommit (line 122) | static bool unix_detect_overcommit(void) {
function unix_detect_physical_memory (line 149) | static void unix_detect_physical_memory( size_t page_size, size_t* physi...
function _mi_prim_mem_init (line 182) | void _mi_prim_mem_init( mi_os_mem_config_t* config )
function _mi_prim_free (line 219) | int _mi_prim_free(void* addr, size_t size ) {
function unix_madvise (line 230) | static int unix_madvise(void* addr, size_t size, int advice) {
function unix_mmap_fd (line 300) | static int unix_mmap_fd(void) {
type memcntl_mha (line 400) | struct memcntl_mha
function _mi_prim_alloc (line 414) | int _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, b...
function unix_mprotect_hint (line 433) | static void unix_mprotect_hint(int err) {
function _mi_prim_commit (line 445) | int _mi_prim_commit(void* start, size_t size, bool* is_zero) {
function _mi_prim_reuse (line 460) | int _mi_prim_reuse(void* start, size_t size) {
function _mi_prim_decommit (line 468) | int _mi_prim_decommit(void* start, size_t size, bool* needs_recommit) {
function _mi_prim_reset (line 494) | int _mi_prim_reset(void* start, size_t size) {
function _mi_prim_protect (line 523) | int _mi_prim_protect(void* start, size_t size, bool protect) {
function mi_prim_mbind (line 543) | static long mi_prim_mbind(void* start, unsigned long len, unsigned long ...
function mi_prim_mbind (line 547) | static long mi_prim_mbind(void* start, unsigned long len, unsigned long ...
function _mi_prim_alloc_huge_os_pages (line 553) | int _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_...
function _mi_prim_alloc_huge_os_pages (line 573) | int _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_...
function _mi_prim_numa_node (line 588) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 600) | size_t _mi_prim_numa_node_count(void) {
function _mi_prim_numa_node (line 613) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 624) | size_t _mi_prim_numa_node_count(void) {
function _mi_prim_numa_node (line 633) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 638) | size_t _mi_prim_numa_node_count(void) {
function _mi_prim_numa_node (line 648) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 652) | size_t _mi_prim_numa_node_count(void) {
function mi_msecs_t (line 666) | mi_msecs_t _mi_prim_clock_now(void) {
function mi_msecs_t (line 679) | mi_msecs_t _mi_prim_clock_now(void) {
function mi_msecs_t (line 711) | static mi_msecs_t timeval_secs(const struct timeval* tv) {
function _mi_prim_process_info (line 715) | void _mi_prim_process_info(mi_process_info_t* pinfo)
function _mi_prim_process_info (line 763) | void _mi_prim_process_info(mi_process_info_t* pinfo)
function _mi_prim_out_stderr (line 776) | void _mi_prim_out_stderr( const char* msg ) {
function _mi_prim_getenv (line 799) | bool _mi_prim_getenv(const char* name, char* result, size_t result_size) {
function _mi_prim_getenv (line 818) | bool _mi_prim_getenv(const char* name, char* result, size_t result_size) {
function _mi_prim_random_buf (line 847) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function _mi_prim_random_buf (line 858) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function _mi_prim_random_buf (line 869) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function _mi_prim_random_buf (line 908) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function mi_pthread_done (line 925) | static void mi_pthread_done(void* value) {
function _mi_prim_thread_init_auto_done (line 931) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 936) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 942) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
function _mi_prim_thread_init_auto_done (line 950) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 954) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 958) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
FILE: src/prim/wasi/prim.c
function _mi_prim_mem_init (line 21) | void _mi_prim_mem_init( mi_os_mem_config_t* config ) {
function _mi_prim_free (line 33) | int _mi_prim_free(void* addr, size_t size ) {
function _mi_prim_alloc (line 122) | int _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, b...
function _mi_prim_commit (line 135) | int _mi_prim_commit(void* addr, size_t size, bool* is_zero) {
function _mi_prim_decommit (line 141) | int _mi_prim_decommit(void* addr, size_t size, bool* needs_recommit) {
function _mi_prim_reset (line 147) | int _mi_prim_reset(void* addr, size_t size) {
function _mi_prim_reuse (line 152) | int _mi_prim_reuse(void* addr, size_t size) {
function _mi_prim_protect (line 157) | int _mi_prim_protect(void* addr, size_t size, bool protect) {
function _mi_prim_alloc_huge_os_pages (line 167) | int _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_...
function _mi_prim_numa_node (line 174) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 178) | size_t _mi_prim_numa_node_count(void) {
function mi_msecs_t (line 191) | mi_msecs_t _mi_prim_clock_now(void) {
function mi_msecs_t (line 204) | mi_msecs_t _mi_prim_clock_now(void) {
function _mi_prim_process_info (line 221) | void _mi_prim_process_info(mi_process_info_t* pinfo)
function _mi_prim_out_stderr (line 232) | void _mi_prim_out_stderr( const char* msg ) {
function _mi_prim_getenv (line 241) | bool _mi_prim_getenv(const char* name, char* result, size_t result_size) {
function _mi_prim_random_buf (line 265) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function _mi_prim_thread_init_auto_done (line 274) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 278) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 282) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
FILE: src/prim/windows/etw.h
type MCGEN_TRACE_CONTEXT (line 243) | typedef struct _MCGEN_TRACE_CONTEXT
function FORCEINLINE (line 268) | FORCEINLINE
function FORCEINLINE (line 308) | FORCEINLINE
function DECLSPEC_NOINLINE (line 323) | DECLSPEC_NOINLINE __inline
type _mcgen_PASTE2 (line 457) | struct _mcgen_PASTE2
type _mcgen_PASTE2 (line 460) | struct _mcgen_PASTE2
type MCGEN_EVENTREGISTER_must_not_be_a_functionLike_macro_MCGEN_EVENTREGISTER (line 464) | typedef void MCGEN_EVENTREGISTER_must_not_be_a_functionLike_macro_MCGEN_...
type _mcgen_PASTE2 (line 470) | struct _mcgen_PASTE2
type _mcgen_PASTE2 (line 473) | struct _mcgen_PASTE2
type MCGEN_EVENTUNREGISTER_must_not_be_a_functionLike_macro_MCGEN_EVENTUNREGISTER (line 477) | typedef void MCGEN_EVENTUNREGISTER_must_not_be_a_functionLike_macro_MCGE...
type _mcgen_PASTE2 (line 483) | struct _mcgen_PASTE2
type _mcgen_PASTE2 (line 486) | struct _mcgen_PASTE2
type MCGEN_EVENTSETINFORMATION_must_not_be_a_functionLike_macro_MCGEN_EVENTSETINFORMATION (line 490) | typedef void MCGEN_EVENTSETINFORMATION_must_not_be_a_functionLike_macro_...
type _mcgen_PASTE2 (line 496) | struct _mcgen_PASTE2
type _mcgen_PASTE2 (line 499) | struct _mcgen_PASTE2
type MCGEN_EVENTWRITETRANSFER_must_not_be_a_functionLike_macro_MCGEN_EVENTWRITETRANSFER (line 503) | typedef void MCGEN_EVENTWRITETRANSFER_must_not_be_a_functionLike_macro_M...
function DECLSPEC_NOINLINE (line 513) | DECLSPEC_NOINLINE __inline
function DECLSPEC_NOINLINE (line 559) | DECLSPEC_NOINLINE __inline
function DECLSPEC_NOINLINE (line 611) | DECLSPEC_NOINLINE __inline
type McGenContext_microsoft_windows_mimalloc (line 766) | typedef struct tagMcGenContext_microsoft_windows_mimalloc {
function ULONG (line 785) | __inline
function McGenContext_microsoft_windows_mimalloc (line 807) | McGenContext_microsoft_windows_mimalloc*
function ETW_INLINE (line 880) | ETW_INLINE
FILE: src/prim/windows/prim.c
type MI_MEM_EXTENDED_PARAMETER_TYPE (line 28) | typedef enum MI_MEM_EXTENDED_PARAMETER_TYPE_E {
type DECLSPEC_ALIGN (line 38) | struct DECLSPEC_ALIGN
type MI_MEM_ADDRESS_REQUIREMENTS (line 43) | typedef struct MI_MEM_ADDRESS_REQUIREMENTS_S {
type PVOID (line 52) | typedef PVOID (__stdcall *PVirtualAlloc2)(HANDLE, PVOID, SIZE_T, ULONG, ...
type LONG (line 53) | typedef LONG (__stdcall *PNtAllocateVirtualMemoryEx)(HANDLE, PVOID*, SI...
type MI_PROCESSOR_NUMBER (line 58) | typedef struct MI_PROCESSOR_NUMBER_S { WORD Group; BYTE Number; BYTE Res...
type VOID (line 60) | typedef VOID (__stdcall *PGetCurrentProcessorNumberEx)(MI_PROCESSOR_NUMB...
type BOOL (line 61) | typedef BOOL (__stdcall *PGetNumaProcessorNodeEx)(MI_PROCESSOR_NUMBER* P...
type BOOL (line 62) | typedef BOOL (__stdcall* PGetNumaNodeProcessorMaskEx)(USHORT Node, PGROU...
type BOOL (line 63) | typedef BOOL (__stdcall *PGetNumaProcessorNode)(UCHAR Processor, PUCHAR ...
type BOOL (line 64) | typedef BOOL (__stdcall* PGetNumaNodeProcessorMask)(UCHAR Node, PULONGLO...
type BOOL (line 65) | typedef BOOL (__stdcall* PGetNumaHighestNodeNumber)(PULONG Node);
type SIZE_T (line 74) | typedef SIZE_T(__stdcall* PGetLargePageMinimum)(VOID);
type BOOL (line 78) | typedef BOOL (__stdcall *PGetPhysicallyInstalledSystemMemory)( PULONGLON...
function win_enable_large_os_pages (line 84) | static bool win_enable_large_os_pages(size_t* large_page_size)
function _mi_prim_mem_init (line 127) | void _mi_prim_mem_init( mi_os_mem_config_t* config )
function _mi_prim_free (line 191) | int _mi_prim_free(void* addr, size_t size ) {
function win_is_out_of_memory_error (line 245) | static bool win_is_out_of_memory_error(DWORD err) {
function _mi_prim_alloc (line 319) | int _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, b...
function _mi_prim_commit (line 338) | int _mi_prim_commit(void* addr, size_t size, bool* is_zero) {
function _mi_prim_decommit (line 355) | int _mi_prim_decommit(void* addr, size_t size, bool* needs_recommit) {
function _mi_prim_reset (line 361) | int _mi_prim_reset(void* addr, size_t size) {
function _mi_prim_reuse (line 372) | int _mi_prim_reuse(void* addr, size_t size) {
function _mi_prim_protect (line 377) | int _mi_prim_protect(void* addr, size_t size, bool protect) {
function _mi_prim_alloc_huge_os_pages (line 429) | int _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_...
function _mi_prim_numa_node (line 440) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 460) | size_t _mi_prim_numa_node_count(void) {
function mi_msecs_t (line 494) | static mi_msecs_t mi_to_msecs(LARGE_INTEGER t) {
function mi_msecs_t (line 505) | mi_msecs_t _mi_prim_clock_now(void) {
function mi_msecs_t (line 518) | static mi_msecs_t filetime_msecs(const FILETIME* ftime) {
type PPROCESS_MEMORY_COUNTERS (line 526) | typedef BOOL (WINAPI *PGetProcessMemoryInfo)(HANDLE, PPROCESS_MEMORY_COU...
function _mi_prim_process_info (line 529) | void _mi_prim_process_info(mi_process_info_t* pinfo)
function _mi_prim_out_stderr (line 563) | void _mi_prim_out_stderr( const char* msg )
function _mi_prim_getenv (line 607) | bool _mi_prim_getenv(const char* name, char* result, size_t result_size) {
function _mi_prim_random_buf (line 628) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
type PUCHAR (line 638) | typedef LONG (NTAPI *PBCryptGenRandom)(HANDLE, PUCHAR, ULONG, ULONG);
function _mi_prim_random_buf (line 641) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function mi_win_tls_init (line 669) | static void mi_win_tls_init(DWORD reason) {
function mi_win_main (line 692) | static void NTAPI mi_win_main(PVOID module, DWORD reason, LPVOID reserve...
function BOOL (line 712) | BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
function _mi_prim_thread_init_auto_done (line 718) | void _mi_prim_thread_init_auto_done(void) { }
function _mi_prim_thread_done_auto_done (line 719) | void _mi_prim_thread_done_auto_done(void) { }
function _mi_prim_thread_associate_default_heap (line 720) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
function mi_win_main_attach (line 727) | static void NTAPI mi_win_main_attach(PVOID module, DWORD reason, LPVOID ...
function mi_win_main_detach (line 732) | static void NTAPI mi_win_main_detach(PVOID module, DWORD reason, LPVOID ...
function _mi_prim_thread_init_auto_done (line 775) | void _mi_prim_thread_init_auto_done(void) { }
function _mi_prim_thread_done_auto_done (line 776) | void _mi_prim_thread_done_auto_done(void) { }
function _mi_prim_thread_associate_default_heap (line 777) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
function mi_process_attach (line 788) | static int mi_process_attach(void) {
function mi_fls_done (line 816) | static void NTAPI mi_fls_done(PVOID value) {
function _mi_prim_thread_init_auto_done (line 824) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 828) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 834) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
function _mi_is_redirected (line 848) | bool _mi_is_redirected(void) {
function mi_decl_export (line 855) | mi_decl_export void _mi_redirect_entry(DWORD reason) {
function _mi_allocator_init (line 873) | bool _mi_allocator_init(const char** message) {
function _mi_allocator_done (line 876) | void _mi_allocator_done(void) {
FILE: src/random.c
function rotl (line 36) | static inline uint32_t rotl(uint32_t x, uint32_t shift) {
function qround (line 40) | static inline void qround(uint32_t x[16], size_t a, size_t b, size_t c, ...
function chacha_block (line 47) | static void chacha_block(mi_random_ctx_t* ctx)
function chacha_next32 (line 81) | static uint32_t chacha_next32(mi_random_ctx_t* ctx) {
function read32 (line 92) | static inline uint32_t read32(const uint8_t* p, size_t idx32) {
function chacha_init (line 97) | static void chacha_init(mi_random_ctx_t* ctx, const uint8_t key[32], uin...
function chacha_split (line 116) | static void chacha_split(mi_random_ctx_t* ctx, uint64_t nonce, mi_random...
function mi_random_is_initialized (line 133) | static bool mi_random_is_initialized(mi_random_ctx_t* ctx) {
function _mi_random_split (line 138) | void _mi_random_split(mi_random_ctx_t* ctx, mi_random_ctx_t* ctx_new) {
function _mi_random_next (line 144) | uintptr_t _mi_random_next(mi_random_ctx_t* ctx) {
function _mi_os_random_weak (line 165) | uintptr_t _mi_os_random_weak(uintptr_t extra_seed) {
function mi_random_init_ex (line 177) | static void mi_random_init_ex(mi_random_ctx_t* ctx, bool use_weak) {
function _mi_random_init (line 198) | void _mi_random_init(mi_random_ctx_t* ctx) {
function _mi_random_init_weak (line 202) | void _mi_random_init_weak(mi_random_ctx_t * ctx) {
function _mi_random_reinit_if_weak (line 206) | void _mi_random_reinit_if_weak(mi_random_ctx_t * ctx) {
FILE: src/segment-map.c
type mi_segmap_part_t (line 42) | typedef struct mi_segmap_part_s {
function mi_segmap_part_t (line 50) | static mi_segmap_part_t* mi_segment_map_index_of(const mi_segment_t* seg...
function _mi_segment_map_allocated_at (line 82) | void _mi_segment_map_allocated_at(const mi_segment_t* segment) {
function _mi_segment_map_freed_at (line 95) | void _mi_segment_map_freed_at(const mi_segment_t* segment) {
function mi_segment_t (line 109) | static mi_segment_t* _mi_segment_of(const void* p) {
function mi_is_valid_pointer (line 126) | static bool mi_is_valid_pointer(const void* p) {
function mi_is_in_heap_region (line 131) | bool mi_is_in_heap_region(const void* p) mi_attr_noexcept {
function _mi_segment_map_unsafe_destroy (line 135) | void _mi_segment_map_unsafe_destroy(void) {
FILE: src/segment.c
function mi_commit_mask_all_set (line 27) | static bool mi_commit_mask_all_set(const mi_commit_mask_t* commit, const...
function mi_commit_mask_any_set (line 34) | static bool mi_commit_mask_any_set(const mi_commit_mask_t* commit, const...
function mi_commit_mask_create_intersect (line 41) | static void mi_commit_mask_create_intersect(const mi_commit_mask_t* comm...
function mi_commit_mask_clear (line 47) | static void mi_commit_mask_clear(mi_commit_mask_t* res, const mi_commit_...
function mi_commit_mask_set (line 53) | static void mi_commit_mask_set(mi_commit_mask_t* res, const mi_commit_ma...
function mi_commit_mask_create (line 59) | static void mi_commit_mask_create(size_t bitidx, size_t bitcount, mi_com...
function _mi_commit_mask_committed_size (line 86) | size_t _mi_commit_mask_committed_size(const mi_commit_mask_t* cm, size_t...
function _mi_commit_mask_next_run (line 105) | size_t _mi_commit_mask_next_run(const mi_commit_mask_t* cm, size_t* idx) {
function mi_slice_t (line 178) | static const mi_slice_t* mi_segment_slices_end(const mi_segment_t* segme...
function mi_slice_bin8 (line 194) | static inline size_t mi_slice_bin8(size_t slice_count) {
function mi_slice_bin (line 204) | static inline size_t mi_slice_bin(size_t slice_count) {
function mi_slice_index (line 212) | static inline size_t mi_slice_index(const mi_slice_t* slice) {
function mi_span_queue_push (line 224) | static void mi_span_queue_push(mi_span_queue_t* sq, mi_slice_t* slice) {
function mi_span_queue_t (line 235) | static mi_span_queue_t* mi_span_queue_for(size_t slice_count, mi_segment...
function mi_span_queue_delete (line 242) | static void mi_span_queue_delete(mi_span_queue_t* sq, mi_slice_t* slice) {
function mi_slice_is_used (line 259) | static bool mi_slice_is_used(const mi_slice_t* slice) {
function mi_span_queue_contains (line 265) | static bool mi_span_queue_contains(mi_span_queue_t* sq, mi_slice_t* slic...
function mi_segment_is_valid (line 272) | static bool mi_segment_is_valid(mi_segment_t* segment, mi_segments_tld_t...
function mi_segment_info_size (line 328) | static size_t mi_segment_info_size(mi_segment_t* segment) {
function mi_segment_calculate_slices (line 370) | static size_t mi_segment_calculate_slices(size_t required, size_t* info_...
function mi_segments_track_size (line 398) | static void mi_segments_track_size(long segment_size, mi_segments_tld_t*...
function mi_segment_os_free (line 407) | static void mi_segment_os_free(mi_segment_t* segment, mi_segments_tld_t*...
function mi_segment_commit_mask (line 437) | static void mi_segment_commit_mask(mi_segment_t* segment, bool conservat...
function mi_segment_commit (line 487) | static bool mi_segment_commit(mi_segment_t* segment, uint8_t* p, size_t ...
function mi_segment_ensure_committed (line 517) | static bool mi_segment_ensure_committed(mi_segment_t* segment, uint8_t* ...
function mi_segment_purge (line 525) | static bool mi_segment_purge(mi_segment_t* segment, uint8_t* p, size_t s...
function mi_segment_schedule_purge (line 554) | static void mi_segment_schedule_purge(mi_segment_t* segment, uint8_t* p,...
function mi_segment_try_purge (line 594) | static void mi_segment_try_purge(mi_segment_t* segment, bool force) {
function _mi_segment_collect (line 619) | void _mi_segment_collect(mi_segment_t* segment, bool force) {
function mi_segment_is_abandoned (line 627) | static bool mi_segment_is_abandoned(mi_segment_t* segment) {
function mi_segment_span_free (line 632) | static void mi_segment_span_free(mi_segment_t* segment, size_t slice_ind...
function mi_segment_span_remove_from_queue (line 673) | static void mi_segment_span_remove_from_queue(mi_slice_t* slice, mi_segm...
function mi_slice_t (line 681) | static mi_slice_t* mi_segment_span_free_coalesce(mi_slice_t* slice, mi_s...
function mi_page_t (line 732) | static mi_page_t* mi_segment_span_allocate(mi_segment_t* segment, size_t...
function mi_segment_slice_split (line 782) | static void mi_segment_slice_split(mi_segment_t* segment, mi_slice_t* sl...
function mi_page_t (line 794) | static mi_page_t* mi_segments_page_find_and_allocate(size_t slice_count,...
function mi_segment_t (line 833) | static mi_segment_t* mi_segment_os_alloc( size_t required, size_t page_a...
function mi_segment_t (line 896) | static mi_segment_t* mi_segment_alloc(size_t required, size_t page_align...
function mi_segment_free (line 975) | static void mi_segment_free(mi_segment_t* segment, bool force, mi_segmen...
function mi_slice_t (line 1019) | static mi_slice_t* mi_segment_page_clear(mi_page_t* page, mi_segments_tl...
function _mi_segment_page_free (line 1055) | void _mi_segment_page_free(mi_page_t* page, bool force, mi_segments_tld_...
function mi_segment_abandon (line 1102) | static void mi_segment_abandon(mi_segment_t* segment, mi_segments_tld_t*...
function _mi_segment_page_abandon (line 1139) | void _mi_segment_page_abandon(mi_page_t* page, mi_segments_tld_t* tld) {
function mi_slice_t (line 1160) | static mi_slice_t* mi_slices_start_iterate(mi_segment_t* segment, const ...
function mi_segment_check_free (line 1169) | static bool mi_segment_check_free(mi_segment_t* segment, size_t slices_n...
function mi_segment_t (line 1213) | static mi_segment_t* mi_segment_reclaim(mi_segment_t* segment, mi_heap_t...
function _mi_segment_attempt_reclaim (line 1285) | bool _mi_segment_attempt_reclaim(mi_heap_t* heap, mi_segment_t* segment) {
function _mi_abandoned_reclaim_all (line 1306) | void _mi_abandoned_reclaim_all(mi_heap_t* heap, mi_segments_tld_t* tld) {
function segment_count_is_within_target (line 1317) | static bool segment_count_is_within_target(mi_segments_tld_t* tld, size_...
function mi_segment_get_reclaim_tries (line 1323) | static long mi_segment_get_reclaim_tries(mi_segments_tld_t* tld) {
function mi_segment_t (line 1335) | static mi_segment_t* mi_segment_try_reclaim(mi_heap_t* heap, size_t need...
function _mi_abandoned_collect (line 1385) | void _mi_abandoned_collect(mi_heap_t* heap, bool force, mi_segments_tld_...
function mi_segment_force_abandon (line 1413) | static void mi_segment_force_abandon(mi_segment_t* segment, mi_segments_...
function mi_segments_try_abandon_to_target (line 1467) | static void mi_segments_try_abandon_to_target(mi_heap_t* heap, size_t ta...
function mi_segments_try_abandon (line 1487) | static void mi_segments_try_abandon(mi_heap_t* heap, mi_segments_tld_t* ...
function mi_collect_reduce (line 1494) | void mi_collect_reduce(size_t target_size) mi_attr_noexcept {
function mi_segment_t (line 1509) | static mi_segment_t* mi_segment_reclaim_or_alloc(mi_heap_t* heap, size_t...
function mi_page_t (line 1537) | static mi_page_t* mi_segments_page_alloc(mi_heap_t* heap, mi_page_kind_t...
function mi_page_t (line 1569) | static mi_page_t* mi_segment_huge_page_alloc(size_t size, size_t page_al...
function _mi_segment_huge_page_free (line 1602) | void _mi_segment_huge_page_free(mi_segment_t* segment, mi_page_t* page, ...
function _mi_segment_huge_page_reset (line 1630) | void _mi_segment_huge_page_reset(mi_segment_t* segment, mi_page_t* page,...
function mi_page_t (line 1650) | mi_page_t* _mi_segment_page_alloc(mi_heap_t* heap, size_t block_size, si...
function else (line 1658) | else if (block_size <= MI_SMALL_OBJ_SIZE_MAX) {
function else (line 1661) | else if (block_size <= MI_MEDIUM_OBJ_SIZE_MAX) {
function else (line 1664) | else if (block_size <= MI_LARGE_OBJ_SIZE_MAX) {
function mi_segment_visit_page (line 1681) | static bool mi_segment_visit_page(mi_page_t* page, bool visit_blocks, mi...
function _mi_segment_visit_blocks (line 1693) | bool _mi_segment_visit_blocks(mi_segment_t* segment, int heap_tag, bool ...
FILE: src/stats.c
function mi_is_in_main (line 22) | static bool mi_is_in_main(void* stat) {
function mi_stat_update (line 27) | static void mi_stat_update(mi_stat_count_t* stat, int64_t amount) {
function _mi_stat_counter_increase (line 47) | void _mi_stat_counter_increase(mi_stat_counter_t* stat, size_t amount) {
function _mi_stat_increase (line 56) | void _mi_stat_increase(mi_stat_count_t* stat, size_t amount) {
function _mi_stat_decrease (line 60) | void _mi_stat_decrease(mi_stat_count_t* stat, size_t amount) {
function mi_stat_adjust (line 65) | static void mi_stat_adjust(mi_stat_count_t* stat, int64_t amount) {
function _mi_stat_adjust_decrease (line 80) | void _mi_stat_adjust_decrease(mi_stat_count_t* stat, size_t amount) {
function mi_stat_count_add_mt (line 86) | static void mi_stat_count_add_mt(mi_stat_count_t* stat, const mi_stat_co...
function mi_stat_counter_add_mt (line 100) | static void mi_stat_counter_add_mt(mi_stat_counter_t* stat, const mi_sta...
function mi_stats_add (line 109) | static void mi_stats_add(mi_stats_t* stats, const mi_stats_t* src) {
function mi_printf_amount (line 135) | static void mi_printf_amount(int64_t n, int64_t unit, mi_output_fun* out...
function mi_print_amount (line 164) | static void mi_print_amount(int64_t n, int64_t unit, mi_output_fun* out,...
function mi_print_count (line 168) | static void mi_print_count(int64_t n, int64_t unit, mi_output_fun* out, ...
function mi_stat_print_ex (line 173) | static void mi_stat_print_ex(const mi_stat_count_t* stat, const char* ms...
function mi_stat_print (line 215) | static void mi_stat_print(const mi_stat_count_t* stat, const char* msg, ...
function mi_stat_total_print (line 220) | static void mi_stat_total_print(const mi_stat_count_t* stat, const char*...
function mi_stat_counter_print (line 228) | static void mi_stat_counter_print(const mi_stat_counter_t* stat, const c...
function mi_stat_average_print (line 235) | static void mi_stat_average_print(size_t count, size_t total, const char...
function mi_print_header (line 243) | static void mi_print_header(mi_output_fun* out, void* arg ) {
function mi_stats_print_bins (line 248) | static void mi_stats_print_bins(const mi_stat_count_t* bins, size_t max,...
type buffered_t (line 272) | typedef struct buffered_s {
function mi_buffered_flush (line 280) | static void mi_buffered_flush(buffered_t* buf) {
function mi_buffered_out (line 286) | static void mi_cdecl mi_buffered_out(const char* msg, void* arg) {
function _mi_stats_print (line 302) | static void _mi_stats_print(mi_stats_t* stats, mi_output_fun* out0, void...
function mi_stats_t (line 375) | static mi_stats_t* mi_stats_get_default(void) {
function mi_stats_merge_from (line 380) | static void mi_stats_merge_from(mi_stats_t* stats) {
function mi_stats_reset (line 387) | void mi_stats_reset(void) mi_attr_noexcept {
function mi_stats_merge (line 394) | void mi_stats_merge(void) mi_attr_noexcept {
function _mi_stats_merge_thread (line 398) | void _mi_stats_merge_thread(mi_tld_t* tld) {
function _mi_stats_done (line 402) | void _mi_stats_done(mi_stats_t* stats) { // called from `mi_thread_done`
function mi_stats_print_out (line 406) | void mi_stats_print_out(mi_output_fun* out, void* arg) mi_attr_noexcept {
function mi_stats_print (line 411) | void mi_stats_print(void* out) mi_attr_noexcept {
function mi_thread_stats_print_out (line 416) | void mi_thread_stats_print_out(mi_output_fun* out, void* arg) mi_attr_no...
function mi_msecs_t (line 427) | mi_msecs_t _mi_clock_now(void) {
function mi_msecs_t (line 431) | mi_msecs_t _mi_clock_start(void) {
function mi_msecs_t (line 439) | mi_msecs_t _mi_clock_end(mi_msecs_t start) {
function mi_decl_export (line 449) | mi_decl_export void mi_process_info(size_t* elapsed_msecs, size_t* user_...
function mi_stats_get (line 479) | bool mi_stats_get(mi_stats_t* stats) mi_attr_noexcept {
type mi_heap_buf_t (line 491) | typedef struct mi_heap_buf_s {
function mi_heap_buf_expand (line 498) | static bool mi_heap_buf_expand(mi_heap_buf_t* hbuf) {
function mi_heap_buf_print (line 512) | static void mi_heap_buf_print(mi_heap_buf_t* hbuf, const char* msg) {
function mi_heap_buf_print_count_bin (line 527) | static void mi_heap_buf_print_count_bin(mi_heap_buf_t* hbuf, const char*...
function mi_heap_buf_print_count (line 543) | static void mi_heap_buf_print_count(mi_heap_buf_t* hbuf, const char* pre...
function mi_heap_buf_print_count_value (line 550) | static void mi_heap_buf_print_count_value(mi_heap_buf_t* hbuf, const cha...
function mi_heap_buf_print_value (line 558) | static void mi_heap_buf_print_value(mi_heap_buf_t* hbuf, const char* nam...
function mi_heap_buf_print_size (line 565) | static void mi_heap_buf_print_size(mi_heap_buf_t* hbuf, const char* name...
function mi_heap_buf_print_counter_value (line 572) | static void mi_heap_buf_print_counter_value(mi_heap_buf_t* hbuf, const c...
FILE: test/main-override-dep.cpp
class Static (line 20) | class Static {
method Static (line 24) | Static() {
function BOOL (line 41) | BOOL WINAPI DllMain(HINSTANCE module, DWORD reason, LPVOID reserved) {
FILE: test/main-override-dep.h
function class (line 7) | class TestAllocInDll
FILE: test/main-override-static.c
function main (line 32) | int main() {
function test_align (line 87) | static void test_align() {
function invalid_free (line 94) | static void invalid_free() {
function block_overflow1 (line 99) | static void block_overflow1() {
function block_overflow2 (line 105) | static void block_overflow2() {
function double_free1 (line 114) | static void double_free1() {
function double_free2 (line 130) | static void double_free2() {
function corrupt_free (line 153) | static void corrupt_free() {
function test_aslr (line 177) | static void test_aslr(void) {
function test_process_info (line 184) | static void test_process_info(void) {
function test_reserved (line 201) | static void test_reserved(void) {
function negative_stat (line 219) | static void negative_stat(void) {
function alloc_huge (line 227) | static void alloc_huge(void) {
function test_visit (line 232) | static bool test_visit(const mi_heap_t* heap, const mi_heap_area_t* area...
function test_heap_walk (line 242) | static void test_heap_walk(void) {
function test_heap_arena (line 251) | static void test_heap_arena(void) {
function test_canary_leak (line 265) | static void test_canary_leak(void) {
function test_manage_os_memory (line 275) | static void test_manage_os_memory(void) {
function test_manage_os_memory (line 297) | static void test_manage_os_memory(void) {
function test_large_pages (line 310) | static void test_large_pages(void) {
function mi_bsr32 (line 357) | static inline uint8_t mi_bsr32(uint32_t x) {
function mi_bsr32 (line 363) | static inline uint8_t mi_bsr32(uint32_t x) {
function mi_bsr32 (line 367) | static inline uint8_t mi_bsr32(uint32_t x) {
function _mi_bsr (line 385) | uint8_t _mi_bsr(uintptr_t x) {
function _mi_wsize_from_size (line 399) | static inline size_t _mi_wsize_from_size(size_t size) {
function mi_bin (line 409) | static inline size_t mi_bin(size_t wsize) {
function _mi_bin4 (line 449) | static inline uint8_t _mi_bin4(size_t size) {
function _mi_binx4 (line 478) | static size_t _mi_binx4(size_t wsize) {
function _mi_binx8 (line 495) | static size_t _mi_binx8(size_t bsize) {
function mi_binx (line 504) | static inline size_t mi_binx(size_t wsize) {
function mi_bins (line 526) | static void mi_bins(void) {
FILE: test/main-override.c
function main (line 8) | int main() {
FILE: test/main-override.cpp
function msleep (line 20) | static void msleep(unsigned long msecs) { Sleep(msecs); }
function msleep (line 23) | static void msleep(unsigned long msecs) { usleep(msecs * 1000UL); }
function main (line 58) | int main() {
function free_p (line 96) | void free_p() {
class Test (line 101) | class Test {
method Test (line 105) | Test(int x) { i = x; }
function various_tests (line 110) | static void various_tests() {
class Static (line 140) | class Static {
method Static (line 144) | Static() {
function test_stl_allocator1 (line 157) | static bool test_stl_allocator1() {
type some_struct (line 164) | struct some_struct { int i; int j; double z; }
function test_dep (line 168) | static void test_dep()
function test_stl_allocator2 (line 177) | static bool test_stl_allocator2() {
function test_stl_allocator3 (line 185) | static bool test_stl_allocator3() {
function test_stl_allocator4 (line 192) | static bool test_stl_allocator4() {
function test_stl_allocator5 (line 199) | static bool test_stl_allocator5() {
function test_stl_allocator6 (line 206) | static bool test_stl_allocator6() {
function test_stl_allocators (line 214) | static void test_stl_allocators() {
function test_mixed0 (line 233) | static void test_mixed0() {
function asd (line 263) | void asd() {
function test_mixed1 (line 267) | static void test_mixed1() {
function test_large_migrate (line 290) | static void test_large_migrate(void) {
function strdup_test (line 309) | static void strdup_test() {
function heap_no_delete_worker (line 321) | static void heap_no_delete_worker() {
function heap_no_delete (line 327) | static void heap_no_delete() {
function test_std_string (line 334) | static void test_std_string() {
function t1main (line 343) | static void t1main() {
function heap_late_free (line 349) | static void heap_late_free() {
function alloc0 (line 361) | static void alloc0(/* void* arg */)
function padding_shrink (line 366) | static void padding_shrink(void)
function heap_thread_free_large_worker (line 375) | static void heap_thread_free_large_worker() {
function heap_thread_free_large (line 379) | static void heap_thread_free_large() {
function heap_thread_free_huge_worker (line 387) | static void heap_thread_free_huge_worker() {
function heap_thread_free_huge (line 391) | static void heap_thread_free_huge() {
function local_alloc (line 402) | static void local_alloc() {
function test_thread_leak (line 416) | static void test_thread_leak(void) {
function test_mt_shutdown (line 427) | static void test_mt_shutdown()
function large_alloc (line 454) | void large_alloc(void)
function fail_aslr (line 464) | static void fail_aslr() {
function dummy_worker (line 472) | static void dummy_worker() {
function tsan_numa_test (line 477) | static void tsan_numa_test() {
function bench_alloc_large (line 488) | static void bench_alloc_large(void) {
class MTest (line 514) | class MTest
method MTest (line 518) | MTest() { data = (char*)malloc(1024); }
function threadFun (line 524) | void threadFun( int i )
function test_thread_local (line 530) | void test_thread_local()
function test_perf_local_alloc (line 548) | static void test_perf_local_alloc()
function test_perf_run (line 566) | static void test_perf_run()
function test_perf (line 580) | void test_perf(void)
function escape (line 588) | static void escape(uint8_t* p, size_t n) {
function test_perf2 (line 594) | void test_perf2(void) {
function test_perf3 (line 603) | void test_perf3(void) {
function local_alloc4 (line 613) | static void local_alloc4() {
function test_perf4 (line 624) | static void test_perf4(void) {
function escape5 (line 635) | void escape5(uint8_t* p, size_t n) {
function local_alloc5 (line 646) | static void local_alloc5() {
function test_perf5 (line 660) | static void test_perf5(void) {
FILE: test/main.c
function test_heap (line 5) | void test_heap(void* p_out) {
function test_large (line 14) | void test_large() {
function main (line 25) | int main() {
FILE: test/test-api-fill.c
function main (line 24) | int main(void) {
function check_zero_init (line 301) | bool check_zero_init(uint8_t* p, size_t size) {
function check_debug_fill_uninit (line 312) | bool check_debug_fill_uninit(uint8_t* p, size_t size) {
function check_debug_fill_freed (line 328) | bool check_debug_fill_freed(uint8_t* p, size_t size) {
FILE: test/test-api.c
function mem_is_zero (line 54) | bool mem_is_zero(uint8_t* p, size_t size) {
function main (line 65) | int main(void) {
function test_heap1 (line 385) | bool test_heap1(void) {
function test_heap2 (line 394) | bool test_heap2(void) {
function test_stl_allocator1 (line 405) | bool test_stl_allocator1(void) {
type some_struct (line 416) | struct some_struct { int i; int j; double z; }
function test_stl_allocator2 (line 418) | bool test_stl_allocator2(void) {
function test_stl_heap_allocator1 (line 429) | bool test_stl_heap_allocator1(void) {
function test_stl_heap_allocator2 (line 440) | bool test_stl_heap_allocator2(void) {
function test_stl_heap_allocator3 (line 451) | bool test_stl_heap_allocator3(void) {
function test_stl_heap_allocator4 (line 469) | bool test_stl_heap_allocator4(void) {
FILE: test/test-stress.c
function pick (line 89) | static uintptr_t pick(random_t r) {
function chance (line 110) | static bool chance(size_t perc, random_t r) {
function free_items (line 133) | static void free_items(void* p) {
function visit_blocks (line 148) | static bool visit_blocks(const mi_heap_t* heap, const mi_heap_area_t* ar...
function stress (line 158) | static void stress(intptr_t tid) {
function test_stress (line 222) | static void test_stress(void) {
function leak (line 251) | static void leak(intptr_t tid) {
function test_leak (line 261) | static void test_leak(void) {
function main (line 279) | int main(int argc, char** argv) {
function DWORD (line 360) | static DWORD WINAPI thread_entry(LPVOID param) {
function run_os_threads (line 365) | static void run_os_threads(size_t nthreads, void (*fun)(intptr_t)) {
function run_os_threads (line 400) | static void run_os_threads(size_t nthreads, void (*fun)(intptr_t)) {
FILE: test/test-wrong.c
function main (line 55) | int main(int argc, char** argv) {
FILE: test/testhelper.h
function check_result (line 20) | static bool check_result(bool result, const char* testname, const char* ...
function print_test_summary (line 41) | static inline int print_test_summary(void)
Condensed preview — 95 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,402K chars).
[
{
"path": ".gitattributes",
"chars": 209,
"preview": "# default behavior is to always use unix style line endings\n* text eol=lf\n*.png binary\n*.pdn binary\n*.jpg binary\n*.sln b"
},
{
"path": ".gitignore",
"chars": 139,
"preview": "build\nide/vs20??/*.db\nide/vs20??/*.opendb\nide/vs20??/*.user\nide/vs20??/.vs\nide/vs20??/VTune*\nout/\ndocs/\n*.zip\n*.tar\n*.gz"
},
{
"path": "CMakeLists.txt",
"chars": 32932,
"preview": "cmake_minimum_required(VERSION 3.18)\nproject(libmimalloc C CXX)\n\nset(CMAKE_C_STANDARD 11)\nset(CMAKE_CXX_STANDARD 17)\n\nop"
},
{
"path": "LICENSE",
"chars": 1096,
"preview": "MIT License\n\nCopyright (c) 2018-2025 Microsoft Corporation, Daan Leijen\n\nPermission is hereby granted, free of charge, t"
},
{
"path": "SECURITY.md",
"chars": 2656,
"preview": "<!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products an"
},
{
"path": "azure-pipelines.yml",
"chars": 7221,
"preview": "# Starter pipeline\n# Start with a minimal pipeline that you can customize to build and deploy your code.\n# Add steps tha"
},
{
"path": "bin/readme.md",
"chars": 5821,
"preview": "# Windows Override\n\n<span id=\"override_on_windows\">We use a separate redirection DLL to override mimalloc on Windows</sp"
},
{
"path": "cmake/JoinPaths.cmake",
"chars": 815,
"preview": "# This module provides function for joining paths\n# known from most languages\n#\n# SPDX-License-Identifier: (MIT OR CC0-1"
},
{
"path": "cmake/mimalloc-config-version.cmake",
"chars": 660,
"preview": "set(mi_version_major 2)\nset(mi_version_minor 2)\nset(mi_version_patch 7)\nset(mi_version ${mi_version_major}.${mi_version_"
},
{
"path": "cmake/mimalloc-config.cmake",
"chars": 833,
"preview": "include(${CMAKE_CURRENT_LIST_DIR}/mimalloc.cmake)\nget_filename_component(MIMALLOC_CMAKE_DIR \"${CMAKE_CURRENT_LIST_DIR}\" "
},
{
"path": "contrib/docker/alpine/Dockerfile",
"chars": 435,
"preview": "# alpine image \nFROM alpine\n\n# Install tools\nRUN apk add build-base make cmake\nRUN apk add git\nRUN apk add vim\n\nRUN mkd"
},
{
"path": "contrib/docker/alpine-arm32v7/Dockerfile",
"chars": 681,
"preview": "# install from an image\n# download first an appropriate tar.gz image into the current directory\n# from <https://github.c"
},
{
"path": "contrib/docker/alpine-x86/Dockerfile",
"chars": 681,
"preview": "# install from an image\n# download first an appropriate tar.gz image into the current directory\n# from <https://github.c"
},
{
"path": "contrib/docker/manylinux-x64/Dockerfile",
"chars": 513,
"preview": "FROM quay.io/pypa/manylinux2014_x86_64\n\n# Install tools\nRUN yum install -y openssl-devel\nRUN yum install -y gcc gcc-c++ "
},
{
"path": "contrib/docker/readme.md",
"chars": 158,
"preview": "Various example docker files used for testing.\n\nUsage:\n\n```\n> cd <host>\n> docker build -t <host>-mimalloc .\n> docker run"
},
{
"path": "contrib/nuget/nuget-release-pipeline.yml",
"chars": 883,
"preview": "# Microsoft.Mimalloc NuGet Release Pipeline\n# Manually triggered pipeline to build, sign, and publish the mimalloc NuGet"
},
{
"path": "contrib/vcpkg/portfile.cmake",
"chars": 2005,
"preview": "vcpkg_from_github(\n OUT_SOURCE_PATH SOURCE_PATH\n REPO microsoft/mimalloc\n HEAD_REF master\n\n # The \"REF\" can be a com"
},
{
"path": "contrib/vcpkg/readme.md",
"chars": 1571,
"preview": "# Vcpkg support\n\nThis directory is meant to provide the sources for the official [vcpkg port] \nof mimalloc, but can also"
},
{
"path": "contrib/vcpkg/usage",
"chars": 672,
"preview": "Use the following CMake targets to import mimalloc:\n\n find_package(mimalloc CONFIG REQUIRED)\n target_link_libraries(ma"
},
{
"path": "contrib/vcpkg/vcpkg-cmake-wrapper.cmake",
"chars": 966,
"preview": "_find_package(${ARGS})\n\nif(CMAKE_CURRENT_LIST_DIR STREQUAL \"${MIMALLOC_CMAKE_DIR}/${MIMALLOC_VERSION_DIR}\")\n set(MIMA"
},
{
"path": "contrib/vcpkg/vcpkg.json",
"chars": 1474,
"preview": "{\n \"name\": \"mimalloc\",\n \"version\": \"3.2.8\",\n \"port-version\": 0,\n \"description\": \"Compact general purpose allocator w"
},
{
"path": "doc/doxyfile",
"chars": 129839,
"preview": "# Doxyfile 1.11.0\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org)"
},
{
"path": "doc/mimalloc-doc.h",
"chars": 94567,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2025, Microsoft Resea"
},
{
"path": "doc/mimalloc-doxygen.css",
"chars": 1016,
"preview": "#projectlogo img {\n\tpadding: 1ex;\n}\ntt, code, kbd, samp, div.memproto, div.fragment, div.line, table.memname {\n\tfont-fam"
},
{
"path": "ide/vs2022/mimalloc-lib.vcxproj",
"chars": 26456,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.micros"
},
{
"path": "ide/vs2022/mimalloc-lib.vcxproj.filters",
"chars": 3537,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
},
{
"path": "ide/vs2022/mimalloc-override-dll.vcxproj",
"chars": 29292,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.micros"
},
{
"path": "ide/vs2022/mimalloc-override-dll.vcxproj.filters",
"chars": 3643,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
},
{
"path": "ide/vs2022/mimalloc-override-test-dep.vcxproj",
"chars": 17492,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microso"
},
{
"path": "ide/vs2022/mimalloc-override-test.vcxproj",
"chars": 17908,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microso"
},
{
"path": "ide/vs2022/mimalloc-test-api.vcxproj",
"chars": 15492,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microso"
},
{
"path": "ide/vs2022/mimalloc-test-stress.vcxproj",
"chars": 15317,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microso"
},
{
"path": "ide/vs2022/mimalloc-test.vcxproj",
"chars": 14658,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microso"
},
{
"path": "ide/vs2022/mimalloc.sln",
"chars": 10736,
"preview": "\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio Version 17\r\nVisualStudioVersion = 17.12."
},
{
"path": "include/mimalloc/atomic.h",
"chars": 22034,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024 Microsoft Resear"
},
{
"path": "include/mimalloc/internal.h",
"chars": 44402,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Resea"
},
{
"path": "include/mimalloc/prim.h",
"chars": 19388,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Resea"
},
{
"path": "include/mimalloc/track.h",
"chars": 5404,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Resea"
},
{
"path": "include/mimalloc/types.h",
"chars": 31795,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Resea"
},
{
"path": "include/mimalloc-new-delete.h",
"chars": 4044,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020 Microsoft Resear"
},
{
"path": "include/mimalloc-override.h",
"chars": 3165,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020 Microsoft Resear"
},
{
"path": "include/mimalloc-stats.h",
"chars": 4325,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2025, Microsoft Resea"
},
{
"path": "include/mimalloc.h",
"chars": 41720,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2026, Microsoft Resea"
},
{
"path": "mimalloc.pc.in",
"chars": 340,
"preview": "prefix=@CMAKE_INSTALL_PREFIX@\nlibdir=@mi_pc_libdir@\nincludedir=@mi_pc_includedir@\n\nName: @PROJECT_NAME@\nDescription: A c"
},
{
"path": "readme.md",
"chars": 55426,
"preview": "\n<img align=\"left\" width=\"100\" height=\"100\" src=\"doc/mimalloc-logo.png\"/>\n\n[<img align=\"right\" src=\"https://dev.azure.co"
},
{
"path": "src/alloc-aligned.c",
"chars": 18123,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Resea"
},
{
"path": "src/alloc-override.c",
"chars": 17196,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Resea"
},
{
"path": "src/alloc-posix.c",
"chars": 6618,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Resea"
},
{
"path": "src/alloc.c",
"chars": 26720,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Resea"
},
{
"path": "src/arena-abandon.c",
"chars": 16712,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2024, Microsoft Resea"
},
{
"path": "src/arena.c",
"chars": 44483,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2024, Microsoft Resea"
},
{
"path": "src/bitmap.c",
"chars": 19367,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2023 Microsoft Resear"
},
{
"path": "src/bitmap.h",
"chars": 6218,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2023 Microsoft Resear"
},
{
"path": "src/free.c",
"chars": 24096,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Resea"
},
{
"path": "src/heap.c",
"chars": 25667,
"preview": "/*----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Resear"
},
{
"path": "src/init.c",
"chars": 26789,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2022, Microsoft Resea"
},
{
"path": "src/libc.c",
"chars": 10203,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Resea"
},
{
"path": "src/options.c",
"chars": 25826,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Resea"
},
{
"path": "src/os.c",
"chars": 30417,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2025, Microsoft Resea"
},
{
"path": "src/page-queue.c",
"chars": 13919,
"preview": "/*----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Resear"
},
{
"path": "src/page.c",
"chars": 40189,
"preview": "/*----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Resear"
},
{
"path": "src/prim/emscripten/prim.c",
"chars": 7607,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2025, Microsoft Resea"
},
{
"path": "src/prim/osx/alloc-override-zone.c",
"chars": 13689,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2022, Microsoft Resea"
},
{
"path": "src/prim/osx/prim.c",
"chars": 489,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Resea"
},
{
"path": "src/prim/prim.c",
"chars": 2443,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Resea"
},
{
"path": "src/prim/readme.md",
"chars": 456,
"preview": "## Portability Primitives\n\nThis is the portability layer where all primitives needed from the OS are defined.\n\n- `includ"
},
{
"path": "src/prim/unix/prim.c",
"chars": 33070,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2025, Microsoft Resea"
},
{
"path": "src/prim/wasi/prim.c",
"chars": 8391,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Resea"
},
{
"path": "src/prim/windows/etw-mimalloc.wprp",
"chars": 2525,
"preview": "<WindowsPerformanceRecorder Version=\"1.0\">\n <Profiles>\n <SystemCollector Id=\"WPR_initiated_WprApp_WPR_System_Collect"
},
{
"path": "src/prim/windows/etw.h",
"chars": 36194,
"preview": "//**********************************************************************`\n//* This is an include file generated by Messa"
},
{
"path": "src/prim/windows/prim.c",
"chars": 34549,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Resea"
},
{
"path": "src/prim/windows/readme.md",
"chars": 548,
"preview": "## Primitives:\n\n- `prim.c` contains Windows primitives for OS allocation.\n\n## Event Tracing for Windows (ETW)\n\n- `etw.h`"
},
{
"path": "src/random.c",
"chars": 9043,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2021, Microsoft Resea"
},
{
"path": "src/segment-map.c",
"chars": 6330,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2023, Microsoft Resea"
},
{
"path": "src/segment.c",
"chars": 72758,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Resea"
},
{
"path": "src/static.c",
"chars": 1296,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020, Microsoft Resea"
},
{
"path": "src/stats.c",
"chars": 23880,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Resea"
},
{
"path": "test/CMakeLists.txt",
"chars": 2182,
"preview": "cmake_minimum_required(VERSION 3.18)\nproject(mimalloc-test C CXX)\n\nset(CMAKE_C_STANDARD 11)\nset(CMAKE_CXX_STANDARD 17)\n\n"
},
{
"path": "test/main-override-dep.cpp",
"chars": 1063,
"preview": "// Issue #981: test overriding allocation in a DLL that is compiled independent of mimalloc. \n// This is imported by the"
},
{
"path": "test/main-override-dep.h",
"chars": 270,
"preview": "#pragma once\n// Issue #981: test overriding allocation in a DLL that is compiled independent of mimalloc. \n// This is im"
},
{
"path": "test/main-override-static.c",
"chars": 13613,
"preview": "#if _WIN32\n#include <windows.h>\n#endif\n#include <stdlib.h>\n#include <stdio.h>\n#include <assert.h>\n#include <string.h>\n#i"
},
{
"path": "test/main-override.c",
"chars": 735,
"preview": "#include <stdlib.h>\n#include <stdio.h>\n#include <assert.h>\n#include <string.h>\n\n#include <mimalloc-override.h>\n\nint main"
},
{
"path": "test/main-override.cpp",
"chars": 14580,
"preview": "#include <stdlib.h>\n#include <stdio.h>\n#include <assert.h>\n#include <string.h>\n#include <stdint.h>\n\n#include <mimalloc.h"
},
{
"path": "test/main.c",
"chars": 906,
"preview": "#include <stdio.h>\n#include <assert.h>\n#include <mimalloc.h>\n\nvoid test_heap(void* p_out) {\n mi_heap_t* heap = mi_heap_"
},
{
"path": "test/readme.md",
"chars": 904,
"preview": "Testing allocators is difficult as bugs may only surface after particular\nallocation patterns. The main approach to test"
},
{
"path": "test/test-api-fill.c",
"chars": 12152,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020, Microsoft Resea"
},
{
"path": "test/test-api.c",
"chars": 14443,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020, Microsoft Resea"
},
{
"path": "test/test-stress.c",
"chars": 12577,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020 Microsoft Resear"
},
{
"path": "test/test-wrong.c",
"chars": 1995,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020, Microsoft Resea"
},
{
"path": "test/testhelper.h",
"chars": 1661,
"preview": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020, Microsoft Resea"
}
]
// ... and 5 more files (download for full content)
About this extraction
This page contains the full source code of the microsoft/mimalloc GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 95 files (1.3 MB), approximately 359.9k tokens, and a symbol index with 1145 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.