Skip to content

Commit 601c876

Browse files
committed
docs(linter): add comment explaining why Mimalloc is feature-gated (#14037)
1 parent cdb7da1 commit 601c876

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

apps/oxlint/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ mod generated {
3333
#[cfg(all(feature = "napi", target_pointer_width = "64", target_endian = "little"))]
3434
mod js_plugins;
3535

36+
// Use Mimalloc as the global allocator if `--features allocator` is enabled.
37+
// Mimalloc has better performance, but this is feature-gated because it's slow to compile.
38+
// `--features allocator` is only used in release builds.
3639
#[cfg(all(feature = "allocator", not(miri), not(target_family = "wasm")))]
3740
#[global_allocator]
3841
static GLOBAL: mimalloc_safe::MiMalloc = mimalloc_safe::MiMalloc;

0 commit comments

Comments
 (0)