Skip to content
Merged
Changes from 1 commit
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
9 changes: 7 additions & 2 deletions scripts/build/deps/mimalloc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,14 @@
args.MI_OVERRIDE = "ON";
args.MI_OSX_ZONE = "OFF";
args.MI_OSX_INTERPOSE = "OFF";
} else if (cfg.windows) {
// Bun links the static CRT and calls mi_* directly; nothing routes
// through CRT malloc. With override ON, dev3's alloc-override.c
// emits _expand/_msize/free into the static lib and lld-link
// duplicates against libucrt(d). mimalloc's *default* is ON, so
// this must be explicit.
args.MI_OVERRIDE = "OFF";
}

Check warning on line 93 in scripts/build/deps/mimalloc.ts

View check run for this annotation

Claude / Claude Code Review

Decision matrix comment omits Windows entry

The decision matrix comment (lines 61–68) lists ASAN, macOS, and Linux override policies but omits a Windows entry, even though this PR adds an explicit `cfg.windows` branch setting `MI_OVERRIDE=OFF`. A reader consulting the matrix to understand Windows override policy would find no entry there; they must discover the rationale from the inline comment deeper in the function.
Comment thread
claude[bot] marked this conversation as resolved.
// Windows: use mimalloc's defaults (no override; Windows has its own
// mechanism via the static CRT we link).

if (cfg.debug) {
// Heavy debug checks: guard bytes, freed-memory poisoning, double-free
Expand Down
Loading