Skip to content

Commit eb2652b

Browse files
authored
Use system libc jemalloc instead of tikv-jemallocator on FreeBSD (solana-labs#2433)
On FreeBSD use system provided malloc (which is jemalloc) instead of the tikv-jemallocator crate.
1 parent f320175 commit eb2652b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

ledger-tool/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ solana_rbpf = { workspace = true, features = ["debugger"] }
5959
thiserror = { workspace = true }
6060
tokio = { workspace = true, features = ["full"] }
6161

62-
[target.'cfg(not(target_env = "msvc"))'.dependencies]
62+
[target.'cfg(not(any(target_env = "msvc", target_os = "freebsd")))'.dependencies]
6363
jemallocator = { workspace = true }
6464

6565
[dev-dependencies]

ledger-tool/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,10 +796,10 @@ fn record_transactions(
796796
}
797797
}
798798

799-
#[cfg(not(target_env = "msvc"))]
799+
#[cfg(not(any(target_env = "msvc", target_os = "freebsd")))]
800800
use jemallocator::Jemalloc;
801801

802-
#[cfg(not(target_env = "msvc"))]
802+
#[cfg(not(any(target_env = "msvc", target_os = "freebsd")))]
803803
#[global_allocator]
804804
static GLOBAL: Jemalloc = Jemalloc;
805805

validator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ solana-runtime = { workspace = true, features = ["dev-context-only-utils"] }
7777
spl-token-2022 = { workspace = true, features = ["no-entrypoint"] }
7878
tempfile = { workspace = true }
7979

80-
[target.'cfg(not(target_env = "msvc"))'.dependencies]
80+
[target.'cfg(not(any(target_env = "msvc", target_os = "freebsd")))'.dependencies]
8181
jemallocator = { workspace = true }
8282

8383
[target."cfg(unix)".dependencies]

validator/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![allow(clippy::arithmetic_side_effects)]
2-
#[cfg(not(target_env = "msvc"))]
2+
#[cfg(not(any(target_env = "msvc", target_os = "freebsd")))]
33
use jemallocator::Jemalloc;
44
use {
55
agave_validator::{
@@ -87,7 +87,7 @@ use {
8787
},
8888
};
8989

90-
#[cfg(not(target_env = "msvc"))]
90+
#[cfg(not(any(target_env = "msvc", target_os = "freebsd")))]
9191
#[global_allocator]
9292
static GLOBAL: Jemalloc = Jemalloc;
9393

0 commit comments

Comments
 (0)