Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions THIRD_PARTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ License summary:
| wyhash | `internal/cbm/vendored/wyhash/` | Unlicense (public domain) | [wangyi-fudan/wyhash](https://github.com/wangyi-fudan/wyhash) |

Local modifications to these libraries are documented next to the
vendored sources (currently only SQLite: `vendored/sqlite3/PATCHES.md`,
raising the Unix VFS `MAX_PATHNAME` ceiling from 512 to 4096 to match
CBM's 4 KiB path support). Patches must be reapplied on every upstream
vendored sources: `vendored/sqlite3/PATCHES.md` documents the Unix VFS
`MAX_PATHNAME` ceiling increase from 512 to 4096 to match CBM's 4 KiB path
support; `vendored/mimalloc/PATCHES.md` documents the reproducible version
banner patch and upstream source pin. Patches must be reapplied on every upstream
refresh and are covered by `scripts/vendored-checksums.txt`.

The graph-UI HTTP server is a first-party implementation
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/generate-sbom.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"packages": [
{"SPDXID": "SPDXRef-Package-sqlite3", "name": "sqlite3", "versionInfo": "3.51.3", "licenseDeclared": "blessing", "downloadLocation": "https://sqlite.org", "filesAnalyzed": False},
{"SPDXID": "SPDXRef-Package-yyjson", "name": "yyjson", "versionInfo": "0.12.0", "licenseDeclared": "MIT", "downloadLocation": "https://github.com/ibireme/yyjson", "filesAnalyzed": False},
{"SPDXID": "SPDXRef-Package-mimalloc", "name": "mimalloc", "versionInfo": "3.3.2", "licenseDeclared": "MIT", "downloadLocation": "https://github.com/microsoft/mimalloc", "filesAnalyzed": False},
{"SPDXID": "SPDXRef-Package-mimalloc", "name": "mimalloc", "versionInfo": "3.4.4", "licenseDeclared": "MIT", "downloadLocation": "https://github.com/microsoft/mimalloc", "filesAnalyzed": False},
{"SPDXID": "SPDXRef-Package-xxhash", "name": "xxhash", "versionInfo": "0.8.3", "licenseDeclared": "BSD-2-Clause", "downloadLocation": "https://github.com/Cyan4973/xxHash", "filesAnalyzed": False},
{"SPDXID": "SPDXRef-Package-tre", "name": "tre", "versionInfo": "0.8.0", "licenseDeclared": "BSD-2-Clause", "downloadLocation": "https://github.com/laurikari/tre", "filesAnalyzed": False},
{"SPDXID": "SPDXRef-Package-tree-sitter", "name": "tree-sitter", "versionInfo": "0.24.4", "licenseDeclared": "MIT", "downloadLocation": "https://github.com/tree-sitter/tree-sitter", "filesAnalyzed": False},
Expand Down
5 changes: 5 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,11 @@ make -j"$NPROC" -f Makefile.cbm cbm TEST_SEAMS=1 ${MAKE_ARGS[@]+"${MAKE_ARGS[@]}
WATCHDOG_BINARY="$ROOT/$BUILD_DIR/codebase-memory-mcp"
CBM_TEST_BINARY="$WATCHDOG_BINARY" bash "$ROOT/tests/test_parent_watchdog.sh"

# The sanitizer runner omits global allocator interposition. Exercise the real
# release allocator before its constructor, independently of the host libc.
echo "=== Step 5a0: production allocator startup regression (mimalloc #1341) ==="
bash "$ROOT/tests/test_mimalloc_startup.sh" "$ROOT/$BUILD_DIR"

# Step 5a: that watchdog is also the SMALLEST-stack thread in the image, which
# makes it the first casualty when static TLS grows — glibc takes the TLS block
# out of each thread's own stack allocation. Checked here, against the binary
Expand Down
74 changes: 38 additions & 36 deletions scripts/vendored-checksums.txt
Original file line number Diff line number Diff line change
Expand Up @@ -992,50 +992,52 @@ a86b7735823b0408a4f3b922be86d4d25b6f4ab0dab32e03fb77246ca439dcf2 internal/cbm/v
9b4bc8245565c98ccfc61c07749928b57e7c0f6fddb0530c4f6aa1971893d88b internal/cbm/vendored/zstd/zstd.h
66a8c3f71d12ea6e797e4f622f31f3f8f81c41b36f48cad4f5de7d8bfb6aac0a internal/cbm/vendored/zstd/zstd_errors.h
82ade5d7d9b029044b5fbbc326207fc47c2d44ee4dd71e8a559c36d728217de9 vendored/mimalloc/LICENSE
dd4f25cae53209d45d73f8e6a2b9c219e8fc7434d97f20eba9af1a8b850030fd vendored/mimalloc/include/mimalloc-new-delete.h
f39ac1a2ed90a4e1b5590f451efcf2e2b49896a3e7652dd9e08b05b48809dbcd vendored/mimalloc/PATCHES.md
1bc31e20fb0340d9d071c69eaac2f07d0dfe4cdf95849ed8d91fb2bd7538d55b vendored/mimalloc/include/mimalloc-new-delete.h
21fcf61c4443341ac6bf6ea528af31dc7267e8e3456fc64bfd07704503032175 vendored/mimalloc/include/mimalloc-override.h
5260df227ea1612b8678a06b063cc8f48e739b551554541cdeb4d430a7e257b3 vendored/mimalloc/include/mimalloc-stats.h
869161433ab2d807a75752d0762accf5b68b6b24ce67e417af46bf181b9b6c72 vendored/mimalloc/include/mimalloc.h
e9512b521a82cc0cbc262f6060dd70bb4243ac4a7d69d6ab8b1ef8e56f181a21 vendored/mimalloc/include/mimalloc/atomic.h
57a7297e18ae464a7bfd3fc25a46229008602385697305c69ed289b89ece7631 vendored/mimalloc/include/mimalloc/bits.h
5aeeff21d667daf4aadcc66f634aa957ecd688d15b277828f367c8c2274251a8 vendored/mimalloc/include/mimalloc/internal.h
555302d2fcd05e974441d0c9c9208c26e860db4b3f17b9025a08f42e0f4807ba vendored/mimalloc/include/mimalloc/prim.h
1f378b4b6063c078d2aeb5d916c1d30b5db787a44ab9118e7daf673b086882c6 vendored/mimalloc/include/mimalloc/track.h
b54e760da2a8d9d8a9cb708e280268c2d194c99bc518b21f72db70100578ad6a vendored/mimalloc/include/mimalloc/types.h
70420b4430da4bb6b5197fd27c6c0df485249c53a986bc9536c9fb643fc7613b vendored/mimalloc/src/alloc-aligned.c
6c8e9b0d042481c55791edb7330daec64bedaf26f0e70c9ca40de3cc17a690fe vendored/mimalloc/src/alloc-override.c
98d0eb877d7b9cdf7e9f857aaf3c739b69f746b91221e0e427e82bdd7cec90b3 vendored/mimalloc/src/alloc-posix.c
a92d58e47220e5b6d138b83d92498771be4195ee59136a134e4461f6f726b9b8 vendored/mimalloc/src/alloc.c
86fde644ede2e8d582e53499568a1713516a20326e0350eaa06a28029cece91b vendored/mimalloc/src/arena-meta.c
a1d6900d2b9a17461aa2a72a7791dfb22f6167b86f7ac6f15f981d9735aa2adb vendored/mimalloc/src/arena.c
de16033e029488e9ade4152ea1274e1a5ecbdc2c8a8d8ee50b745fd037ee6f6c vendored/mimalloc/src/bitmap.c
2e7a54ff44592a1fe8fe929e691322622f8aa1e0b1e80954781f332a88dd6cd1 vendored/mimalloc/src/bitmap.h
c9a845dd7b9020f26d73761d235fb75e7bc4a3682576de750050ac4098211b43 vendored/mimalloc/src/free.c
ae8e88737c9861e8e071fe5f1e7acc52093bcffd136a359a6b473101e968c14f vendored/mimalloc/src/heap.c
eca1fe77d72ab2aaccc447c8119056e9c4e8851bda9a95472b573539f76107ad vendored/mimalloc/src/init.c
ebd95b475f15d5387e6ef3c88a9cb47b88e64d7e55998ae1dc656614676a443b vendored/mimalloc/src/libc.c
192ce06ac9076445d223205fb340d8a1fc818dbf2b4c4a801dfd2c10bc6c1162 vendored/mimalloc/src/options.c
011e965f28c0e2c885a6834d51bd756a458dd37ebfed6fd4d9ad6607ce0390ed vendored/mimalloc/src/os.c
1be3a208c678fc34187c2a8ffb75f3fe1eecc674bbf8b2af4d1f329506b1fad5 vendored/mimalloc/src/page-map.c
7ec275805c9f00eb66710ffa99817b3ed1dba9826435d08f4866f7935152f6ae vendored/mimalloc/src/page-queue.c
d3614a59f2407a32e75b051deb1aff31b233f587d325dcc5420ba508551b687e vendored/mimalloc/src/page.c
7488e9e562ca85d2d757ec48e4d334935263a2333aa05b6061d8520f427c5890 vendored/mimalloc/src/prim/emscripten/prim.c
ce14eb6dfd55f241095b55f70983931a2d92f7a6a622a9b360cdd70ab3b53208 vendored/mimalloc/src/prim/osx/alloc-override-zone.c
48b31f349120c534b008d7bc43f7e3c9602df5fb3530b10688a19a0f31329d0a vendored/mimalloc/include/mimalloc-stats.h
b457b2365eb25d852efe02f0b5808c99f822b2934d6bcf9acf3a06254c8dcdd1 vendored/mimalloc/include/mimalloc.h
b815499d737a607fec9e4da05de9b93eadc71a7227e7297723d2595ef76bb56b vendored/mimalloc/include/mimalloc/atomic.h
6efb7256ce1e545c89fb4fb9b644559d2048d2856e3a0b896c81bfc449d2fd55 vendored/mimalloc/include/mimalloc/bits.h
d1775f0e8693391d63a076454e2eb9bdc6662c966d7151e566fd205a6f6f7cd6 vendored/mimalloc/include/mimalloc/internal.h
8eaf268579821ba137d9ff14497ffff54684ee3efaf30907d11e9a3586a0d615 vendored/mimalloc/include/mimalloc/prim-tls.h
1dabd75cbc71502d0f88a8d2af94526bf151f337b702bc9c07b9cda90ae218b3 vendored/mimalloc/include/mimalloc/prim.h
e7d94cae6b36f92b934b76aa3d24854845710e798654bdd29cef90e13e0f161e vendored/mimalloc/include/mimalloc/track.h
7561d1224ca585923fa673fd7add6e5b83ec491615f172217554ea89167ae557 vendored/mimalloc/include/mimalloc/types.h
ce91209c4299f627874ae23c9e7e16e36d585742bf29e5bad48350460d7da2f9 vendored/mimalloc/src/alloc-aligned.c
64c145ff98af7ed0a2d4049b0c7ab7adeae816237990e73919cf11d387a8f831 vendored/mimalloc/src/alloc-override.c
cd4cb1b639a7eab39425a669f897558df761b8103cd5f66f8028c259cf62690a vendored/mimalloc/src/alloc-posix.c
2d227b31c62fbfa2b6d8b1603b62e86bb1aecacc80c60fbddc83656b117c8561 vendored/mimalloc/src/alloc.c
6929e3660109969b7b86aa7538dcb4c3ab14e347bfa0a5abbc2ab6fc8adc4a6d vendored/mimalloc/src/arena-meta.c
0919ab2a7a69a90ff88b7cfcdb3d4c67a2bfc791b8a6617cd31b37b7b9295093 vendored/mimalloc/src/arena.c
b148dcfc3b6b5b9f3e6ef33278b7c5c063bdfa555cb84399e7026d1b726ecd01 vendored/mimalloc/src/bitmap.c
69dea8bc6badb8612ce3c10a1a16a7e54aacc7cd1a82b16ef00efe9ab3d00d03 vendored/mimalloc/src/bitmap.h
1abf2f16f7c8b8bc96e3c91adac2793cf2f62cb18d3aa8009b39c00e18da04fd vendored/mimalloc/src/free.c
826493ad3b4b999071d03884e5bd63380a07c2b26e558ef05dc181408917500a vendored/mimalloc/src/heap.c
21e06e19ca2383f98cbacf2629e613a28c4165baf3d0102ca46834ecab5bcdcc vendored/mimalloc/src/init.c
47c9375964be1f93d77e26e7f2216bd2ba3fe02104d684eab439b7f3863849ca vendored/mimalloc/src/libc.c
78213175bcd6f649408dd0b6133cd60bb6640be6dac6f05edffa33211ab7a753 vendored/mimalloc/src/options.c
e55a179cbbe6035133e0d76f5a09b0958044af9cc91b49174ca660505814454c vendored/mimalloc/src/os.c
8e320ee05354b73aec7c786cbf3659bd84efa53cabeed9249626e41fd22d7e5c vendored/mimalloc/src/page-map.c
a7f3e45ecfacf0beab5b8df20dfb7f43990c96ab906f64d50a2a7526c7ac7f86 vendored/mimalloc/src/page-queue.c
ca1ae321f315f4883ffffb648db70a391b181f185f6a2b4bde7d0b2682fc4fde vendored/mimalloc/src/page.c
896fc1016a26e10c6cf96259d0524c57e123ac9dcef1ba04f23d0add445286dd vendored/mimalloc/src/prim/emscripten/prim.c
10dde0c09fb859e2a67151f51d0737a50531c6fd492eb563e1e6ad03a9b0800c vendored/mimalloc/src/prim/osx/alloc-override-zone.c
247a9952465eb105be03a9962e922b085ce5d52034775551a61cd8594275be73 vendored/mimalloc/src/prim/osx/prim.c
cc771788e5ba591efb681829a8724f8662a1f50f3db39cf5ebe7738b8ed57e44 vendored/mimalloc/src/prim/prim.c
6eff9f103ed868bca18d158673e1f6d661cd49b377229d2a87832cc8a1b6e966 vendored/mimalloc/src/prim/prim.c
792531421c247fca0766ff7630057ec491173578ca4d1919ae34f05eb289ccf4 vendored/mimalloc/src/prim/readme.md
c1ae32eaac7ccf18c10058cca99723892f8bd027318590151f5011c929c7e3be vendored/mimalloc/src/prim/unix/prim.c
bee9c655a17e1e93bf4908e0a902fd3b566628447b1446fcbfa92bca2e76ca15 vendored/mimalloc/src/prim/wasi/prim.c
14c9e5a2e6c585bb4e6ab4c34534d2dd15fac7b7def6c5b210cd158420f54d3f vendored/mimalloc/src/prim/unix/prim.c
2bc862cddb522314d58b3c6ef041e101c25cf04dfdda35cf78f91dbb6140cf46 vendored/mimalloc/src/prim/wasi/prim.c
f70e61a1f2fe63da2f51c581895cf4a0918a9bffb0cf8600171f297141446962 vendored/mimalloc/src/prim/windows/etw-mimalloc.wprp
4f3110ef2054c95cb275be96cb279224d3d46a728c5117bd1435425f382de778 vendored/mimalloc/src/prim/windows/etw.h
445e6a70f9728fcc76a5ba52079336064d5e2257c2969023f1c64bf943776f54 vendored/mimalloc/src/prim/windows/etw.man
5cde60fcef94cd79ab816030be00f8c1bdf18fab343563508c681ec6e762d1f1 vendored/mimalloc/src/prim/windows/prim.c
0ebbc38867f12c9a091983dbbcc5ba00bef1767520d95a763228cd7f6b26d2a2 vendored/mimalloc/src/prim/windows/prim.c
1bcb43eef7fcddf6d8f18c6d5ee9bd350090ed183a1009d4f1c9b4d81a205bb9 vendored/mimalloc/src/prim/windows/readme.md
a96a1acc75fd6595811b28420cf0495b87fac98c4dbc73aa0d742b6824f607c8 vendored/mimalloc/src/random.c
c833eaf89ebd73c05a47a5ea8b439f4cc8a7ec5b87f85ddad4ddb72640d1c34e vendored/mimalloc/src/random.c
4059be2a6676693be3433f5aedc711f56301772e65f3573654c236d6d1cfd074 vendored/mimalloc/src/static.c
16825bbc252de422982b5728df7eda181d952824f5e3ce958c7fc85feae64b8e vendored/mimalloc/src/stats.c
7f76bcace4b0578f2063477752138adabd99f7b10a276998e296a312c47a7cfe vendored/mimalloc/src/theap.c
49be69a4b674e09690a63870830f3ffb05698ed4210949ef5add11957a08325b vendored/mimalloc/src/threadlocal.c
05a99787ab042f1fc714f0f53ba4ed0d884e3b8aaaaaead73d0a6db3dd4e36ac vendored/mimalloc/src/stats.c
ac9623f2275db103b7c53d7d6f3f55b93bdf5098e3c5e38c638b52f109d0f60d vendored/mimalloc/src/theap.c
7ff67f4b97409e208a8d24d7ea13e7bc4f4d57d40b71bdce912d607a021bbe8d vendored/mimalloc/src/threadlocal.c
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 vendored/nomic/LICENSE
893a74d9e3f0a74358344edc999e165739df343b36297967f3fd9cd462022f39 vendored/nomic/NOTICE
dab3009c0d76b0c5e05ad8abc7c9f8f6effca547fea3c0394be96418a85c1081 vendored/nomic/code_tokens.h
Expand Down
56 changes: 56 additions & 0 deletions tests/test_mimalloc_startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env bash
set -euo pipefail

# The sanitizer runner does not interpose malloc/free. Link the production
# allocator instead and call free(NULL) from ELF preinit, before its constructor.
# This reproduces mimalloc #1341 even on a libc that does not call free(NULL)
# during libstdc++ startup. Run after building cbm:
# bash tests/test_mimalloc_startup.sh [build-directory]
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
BUILD_DIR="${1:-$ROOT/build/c}"
if [[ "$(uname -s)" != Linux ]]; then
echo "SKIP_PLATFORM: mimalloc startup regression requires ELF preinit (Linux)"
exit 0
fi
[[ -f "$BUILD_DIR/prod_mimalloc.o" ]] || {
echo "FAIL: build the production allocator first: $BUILD_DIR/prod_mimalloc.o" >&2
exit 1
}
WORK="$(mktemp -d)"
trap 'rm -rf "$WORK"' EXIT

cat > "$WORK/startup.c" <<'EOF'
#include <stdbool.h>
#include <stdlib.h>
#include "mimalloc.h"

static bool early_free_called;

static void early_free(void) {
void (*volatile release)(void *) = free; // Prevent optimizing away free(NULL).
release(NULL);
early_free_called = true;
}

__attribute__((section(".preinit_array"), used))
static void (*const preinit)(void) = early_free;

int main(void) {
if (!early_free_called) {
return 1;
}
void *p = mi_malloc(32);
if (p == NULL) {
return 1;
}
mi_free(p);
return 0;
}
EOF

read -r -a compiler <<< "${CC:-cc}"
"${compiler[@]}" -std=c11 -O2 -Wall -Wextra -Werror \
-I"$ROOT/vendored/mimalloc/include" "$WORK/startup.c" \
"$BUILD_DIR/prod_mimalloc.o" -lm -lpthread -o "$WORK/startup"
"$WORK/startup"
echo "PASS: production free(NULL) before allocator initialization"
24 changes: 24 additions & 0 deletions vendored/mimalloc/PATCHES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# mimalloc vendoring

Sources: [microsoft/mimalloc v3.4.4](https://github.com/microsoft/mimalloc/tree/v3.4.4),
commit `1f06f694972279bbc7ec72902e8570f5784d0fc9`.
Only `include/`, `src/`, and `LICENSE` are vendored.

This release includes the fix for
[mimalloc #1341](https://github.com/microsoft/mimalloc/issues/1341):
`free(NULL)` must work before allocator initialization. Without it, glibc 2.44's
`newlocale()` can crash during libstdc++ startup with CBM's Linux global override.

## Local modifications

`src/options.c`: remove `__DATE__` and `__TIME__` from the version banner so
identical sources can produce reproducible binaries. The patch is marked
`CBM LOCAL PATCH` inline. Reapply it on every upstream refresh.

`src/prim/osx/alloc-override-zone.c`: reword the comment about a child crashing
while forking, avoiding a literal function-call spelling that CBM's vendored
security scanner would mistake for an actual subprocess call. No code changes.

After refreshing, update the mimalloc version in `scripts/ci/generate-sbom.py`
and regenerate `scripts/vendored-checksums.txt` with
`scripts/security-vendored.sh --update`.
2 changes: 1 addition & 1 deletion vendored/mimalloc/include/mimalloc-new-delete.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ terms of the MIT license. A copy of the license can be found in the file
void operator delete[](void* p, std::size_t n) noexcept { mi_free_size(p,n); };
#endif

#if (__cplusplus > 201402L || defined(__cpp_aligned_new))
#if (__cplusplus > 201402L && defined(__cpp_aligned_new))
void operator delete (void* p, std::align_val_t al) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }
void operator delete[](void* p, std::align_val_t al) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }
void operator delete (void* p, std::size_t n, std::align_val_t al) noexcept { mi_free_size_aligned(p, n, static_cast<size_t>(al)); };
Expand Down
4 changes: 2 additions & 2 deletions vendored/mimalloc/include/mimalloc-stats.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------------
Copyright (c) 2024-2025, Microsoft Research, Daan Leijen
Copyright (c) 2024-2026, 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.
Expand All @@ -22,7 +22,7 @@ terms of the MIT license. A copy of the license can be found in the file
#elif __cplusplus >= 201103L
#define mi_decl_align(a) alignas(a)
#else
#define mi_decl_align(a)
#define mi_decl_align(a) _Alignas(a)
#endif


Expand Down
11 changes: 5 additions & 6 deletions vendored/mimalloc/include/mimalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ terms of the MIT license. A copy of the license can be found in the file
#ifndef MIMALLOC_H
#define MIMALLOC_H

#define MI_MALLOC_VERSION 30302 // major + 2 digits minor + 2 digits patch
#define MI_MALLOC_VERSION 30404 // major + 2 digits minor + 2 digits patch

// ------------------------------------------------------
// Compiler specific attributes
Expand Down Expand Up @@ -95,7 +95,7 @@ terms of the MIT license. A copy of the license can be found in the file
// Includes
// ------------------------------------------------------

#include <stddef.h> // size_t
#include <stddef.h> // size_t, wchar_t
#include <stdbool.h> // bool

#ifdef __cplusplus
Expand Down Expand Up @@ -187,7 +187,7 @@ typedef void (mi_cdecl mi_error_fun)(int err, void* arg);
mi_decl_export void mi_register_error(mi_error_fun* fun, void* arg);

mi_decl_export void mi_collect(bool force) mi_attr_noexcept;
mi_decl_export int mi_version(void) mi_attr_noexcept;
mi_decl_export int mi_version(void);
mi_decl_export void mi_options_print(void) mi_attr_noexcept;
mi_decl_export void mi_process_info_print(void) mi_attr_noexcept;
mi_decl_export void mi_options_print_out(mi_output_fun* out, void* arg) mi_attr_noexcept;
Expand Down Expand Up @@ -465,7 +465,7 @@ typedef enum mi_option_e {
mi_option_deprecated_purge_extend_delay,
mi_option_disallow_arena_alloc, // 1 = do not use arena's for allocation (except if using specific arena id's)
mi_option_retry_on_oom, // retry on out-of-memory for N milli seconds (=400), set to 0 to disable retries. (only on windows)
mi_option_visit_abandoned, // allow visiting theap blocks from abandoned threads (=0)
mi_option_deprecated_visit_abandoned, // allow visiting theap blocks from abandoned threads (=0)
mi_option_guarded_min, // only used when building with MI_GUARDED: minimal rounded object size for guarded objects (=0)
mi_option_guarded_max, // only used when building with MI_GUARDED: maximal rounded object size for guarded objects (=0)
mi_option_guarded_precise, // disregard minimal alignment requirement to always place guarded blocks exactly in front of a guard page (=0)
Expand Down Expand Up @@ -519,7 +519,7 @@ mi_decl_nodiscard mi_decl_export size_t mi_malloc_size(const void* p) mi_
mi_decl_nodiscard mi_decl_export size_t mi_malloc_good_size(size_t size) mi_attr_noexcept;
mi_decl_nodiscard mi_decl_export size_t mi_malloc_usable_size(const void *p) mi_attr_noexcept;

mi_decl_export int mi_posix_memalign(void** p, size_t alignment, size_t size) mi_attr_noexcept;
mi_decl_export int mi_posix_memalign(void** p, size_t alignment, size_t size); // mi_attr_noexcept;
mi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_memalign(size_t alignment, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2) mi_attr_alloc_align(1);
mi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_valloc(size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1);
mi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_pvalloc(size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1);
Expand All @@ -536,7 +536,6 @@ mi_decl_export void mi_free_aligned(void* p, size_t alignment)
mi_decl_export int mi_dupenv_s(char** buf, size_t* size, const char* name) mi_attr_noexcept;

// wide characters
#include <wchar.h> // wchar_t
mi_decl_export int mi_wdupenv_s(wchar_t** buf, size_t* size, const wchar_t* name) mi_attr_noexcept;
mi_decl_nodiscard mi_decl_export mi_decl_restrict wchar_t* mi_wcsdup(const wchar_t* s) mi_attr_noexcept mi_attr_malloc;
mi_decl_nodiscard mi_decl_export mi_decl_restrict unsigned char* mi_mbsdup(const unsigned char* s) mi_attr_noexcept mi_attr_malloc;
Expand Down
Loading
Loading