File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -756,7 +756,7 @@ checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681"
756756dependencies = [
757757 " serde" ,
758758 " termcolor" ,
759- " unicode-width 0.1.14 " ,
759+ " unicode-width 0.2.2 " ,
760760]
761761
762762[[package ]]
@@ -3837,6 +3837,7 @@ dependencies = [
38373837 " rustc_target" ,
38383838 " serde_json" ,
38393839 " shlex" ,
3840+ " tikv-jemallocator" ,
38403841 " tracing" ,
38413842 " windows 0.61.3" ,
38423843]
@@ -5551,6 +5552,16 @@ dependencies = [
55515552 " libc" ,
55525553]
55535554
5555+ [[package ]]
5556+ name = " tikv-jemallocator"
5557+ version = " 0.6.1"
5558+ source = " registry+https://github.com/rust-lang/crates.io-index"
5559+ checksum = " 0359b4327f954e0567e69fb191cf1436617748813819c94b8cd4a431422d053a"
5560+ dependencies = [
5561+ " libc" ,
5562+ " tikv-jemalloc-sys" ,
5563+ ]
5564+
55545565[[package ]]
55555566name = " tinystr"
55565567version = " 0.8.2"
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ features = ['override_allocator_on_supported_platforms']
3535[features ]
3636# tidy-alphabetical-start
3737check_only = [' rustc_driver_impl/check_only' ]
38- jemalloc = [' dep:tikv-jemalloc-sys' ]
38+ jemalloc = [' dep:tikv-jemalloc-sys' , ' rustc_driver_impl/jemalloc ' ]
3939llvm = [' rustc_driver_impl/llvm' ]
4040llvm_enzyme = [' rustc_driver_impl/llvm_enzyme' ]
4141llvm_offload = [' rustc_driver_impl/llvm_offload' ]
Original file line number Diff line number Diff line change @@ -55,9 +55,15 @@ features = [
5555ctrlc = " 3.4.4"
5656# tidy-alphabetical-end
5757
58+ [dependencies .tikv-jemallocator ]
59+ version = " 0.6.1"
60+ optional = true
61+ features = [' override_allocator_on_supported_platforms' ]
62+
5863[features ]
5964# tidy-alphabetical-start
6065check_only = [' rustc_interface/check_only' ]
66+ jemalloc = [' dep:tikv-jemallocator' ]
6167llvm = [' rustc_interface/llvm' ]
6268llvm_enzyme = [' rustc_interface/llvm_enzyme' ]
6369llvm_offload = [' rustc_interface/llvm_offload' ]
Original file line number Diff line number Diff line change @@ -63,6 +63,10 @@ use rustc_target::json::ToJson;
6363use rustc_target:: spec:: { Target , TargetTuple } ;
6464use tracing:: trace;
6565
66+ #[ cfg( feature = "jemalloc" ) ]
67+ #[ global_allocator]
68+ static GLOBAL : tikv_jemallocator:: Jemalloc = tikv_jemallocator:: Jemalloc ;
69+
6670#[ allow( unused_macros) ]
6771macro do_not_use_print( $( $t: tt) * ) {
6872 std:: compile_error!(
Original file line number Diff line number Diff line change @@ -442,6 +442,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
442442 "thorin-dwp" ,
443443 "thread_local" ,
444444 "tikv-jemalloc-sys" ,
445+ "tikv-jemallocator" ,
445446 "tinystr" ,
446447 "tinyvec" ,
447448 "tinyvec_macros" ,
You can’t perform that action at this time.
0 commit comments