Use default allocator as a default (#11293)
This commit is contained in:
parent
aeff468e9c
commit
092869d1fa
3 changed files with 7 additions and 7 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -5678,9 +5678,9 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libmimalloc-sys"
|
name = "libmimalloc-sys"
|
||||||
version = "0.1.35"
|
version = "0.1.37"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664"
|
checksum = "81eb4061c0582dedea1cbc7aff2240300dd6982e0239d1c99e65c1dbf4a30ba7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
|
@ -6045,9 +6045,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mimalloc"
|
name = "mimalloc"
|
||||||
version = "0.1.39"
|
version = "0.1.41"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c"
|
checksum = "9f41a2280ded0da56c8cf898babb86e8f10651a34adcfff190ae9a1159c6908d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libmimalloc-sys",
|
"libmimalloc-sys",
|
||||||
]
|
]
|
||||||
|
|
|
@ -61,7 +61,7 @@ languages.workspace = true
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
markdown_preview.workspace = true
|
markdown_preview.workspace = true
|
||||||
menu.workspace = true
|
menu.workspace = true
|
||||||
mimalloc = "0.1"
|
mimalloc = { version = "0.1", optional = true }
|
||||||
nix = {workspace = true, features = ["pthread"] }
|
nix = {workspace = true, features = ["pthread"] }
|
||||||
node_runtime.workspace = true
|
node_runtime.workspace = true
|
||||||
notifications.workspace = true
|
notifications.workspace = true
|
||||||
|
|
|
@ -24,7 +24,6 @@ use language::LanguageRegistry;
|
||||||
use log::LevelFilter;
|
use log::LevelFilter;
|
||||||
|
|
||||||
use assets::Assets;
|
use assets::Assets;
|
||||||
use mimalloc::MiMalloc;
|
|
||||||
use node_runtime::RealNodeRuntime;
|
use node_runtime::RealNodeRuntime;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use release_channel::AppCommitSha;
|
use release_channel::AppCommitSha;
|
||||||
|
@ -56,8 +55,9 @@ use zed::{
|
||||||
OpenListener, OpenRequest,
|
OpenListener, OpenRequest,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(feature = "mimalloc")]
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static GLOBAL: MiMalloc = MiMalloc;
|
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||||
|
|
||||||
fn fail_to_launch(e: anyhow::Error) {
|
fn fail_to_launch(e: anyhow::Error) {
|
||||||
App::new().run(move |cx| {
|
App::new().run(move |cx| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue