diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-05-03 00:36:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-03 00:36:33 +0200 |
commit | 798c1ad0f1de80ff0e7196b6140a3f74e31fe111 (patch) | |
tree | 44233e68b9846ee3335b68b3ddaff00bec76d91f /cli/main.rs | |
parent | adcda4fa640939682076e793f12a5b22e3de1f50 (diff) |
perf: use jemalloc as global allocator (#18957)
Follow up to https://github.com/denoland/deno/pull/18875 that enables
`jemalloc` as a global allocator for the Deno CLI.
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/main.rs b/cli/main.rs index 85942cbd8..c3421b0cd 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -26,6 +26,13 @@ mod version; mod watcher; mod worker; +#[cfg(not(target_env = "msvc"))] +use tikv_jemallocator::Jemalloc; + +#[cfg(not(target_env = "msvc"))] +#[global_allocator] +static GLOBAL: Jemalloc = Jemalloc; + use crate::args::flags_from_vec; use crate::args::DenoSubcommand; use crate::args::Flags; |