Use mimalloc as default allocator (#7140)
From https://github.com/microsoft/mimalloc: > In our benchmarks (see [below](https://github.com/microsoft/mimalloc#performance)), 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. Release Notes: - Changed default allocator to mimalloc.
This commit is contained in:
@@ -66,6 +66,7 @@ libc = "0.2"
|
||||
log.workspace = true
|
||||
lsp = { path = "../lsp" }
|
||||
menu = { path = "../menu" }
|
||||
mimalloc = "0.1"
|
||||
node_runtime = { path = "../node_runtime" }
|
||||
notifications = { path = "../notifications" }
|
||||
num_cpus = "1.13.0"
|
||||
|
||||
@@ -18,6 +18,7 @@ use language::LanguageRegistry;
|
||||
use log::LevelFilter;
|
||||
|
||||
use assets::Assets;
|
||||
use mimalloc::MiMalloc;
|
||||
use node_runtime::RealNodeRuntime;
|
||||
use parking_lot::Mutex;
|
||||
use release_channel::{parse_zed_link, AppCommitSha, ReleaseChannel, RELEASE_CHANNEL};
|
||||
@@ -57,6 +58,9 @@ use zed::{
|
||||
OpenRequest,
|
||||
};
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
fn main() {
|
||||
menu::init();
|
||||
zed_actions::init();
|
||||
|
||||
Reference in New Issue
Block a user