Add back jemalloc support

This commit is contained in:
Jonas Schievink 2021-01-18 19:25:55 +01:00
parent 6764d790ac
commit 9b5fa1c61a
7 changed files with 94 additions and 4 deletions

View file

@ -49,7 +49,8 @@ FLAGS:
--client[=CLIENT] Install only VS Code plugin.
CLIENT is one of 'code', 'code-exploration', 'code-insiders', 'codium', or 'code-oss'
--server Install only the language server
--mimalloc Use mimalloc for server
--mimalloc Use mimalloc allocator for server
--jemalloc Use jemalloc allocator for server
-h, --help Prints help information
"
);
@ -65,8 +66,13 @@ FLAGS:
return Ok(());
}
let malloc =
if args.contains("--mimalloc") { Malloc::Mimalloc } else { Malloc::System };
let malloc = if args.contains("--mimalloc") {
Malloc::Mimalloc
} else if args.contains("--jemalloc") {
Malloc::Jemalloc
} else {
Malloc::System
};
let client_opt = args.opt_value_from_str("--client")?;