Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 22 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ iana-time-zone = "0.1.65"
indexmap = { version = "2.14.0", default-features = false }
indoc = "2.0.7"
itoa = "1.0.18"
jemallocator = "0.5.4"
rusty_alloc-api = "=1.1.4"
mimalloc-safe = "0.1.65"
lz4_flex = "0.14.0"
num-bigint = "0.5.1"
Expand Down
2 changes: 1 addition & 1 deletion benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ walkdir = "2"
regex.workspace = true

[target.x86_64-unknown-linux-gnu.dev-dependencies]
jemallocator.workspace = true
rusty_alloc-api.workspace = true

[target.'cfg(target_os = "macos")'.dev-dependencies]
mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit"] }
Expand Down
2 changes: 1 addition & 1 deletion benches/benches/scripts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{path::Path, time::Duration};

#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
static ALLOC: rusty_alloc_api::RustyAlloc = rusty_alloc_api::RustyAlloc;

#[cfg(target_os = "macos")]
#[global_allocator]
Expand Down
4 changes: 2 additions & 2 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ default = [
"fetch",
]
dhat = ["dep:dhat"]
fast-allocator = ["dep:mimalloc-safe", "dep:jemallocator"]
fast-allocator = ["dep:mimalloc-safe", "dep:rusty_alloc-api"]
fetch = ["boa_runtime/fetch", "boa_runtime/reqwest-blocking"]

[target.x86_64-unknown-linux-gnu.dependencies]
jemallocator = { workspace = true, optional = true }
rusty_alloc-api = { workspace = true, optional = true }

[target.'cfg(any(target_os = "windows", target_os = "macos"))'.dependencies]
mimalloc-safe = { workspace = true, optional = true, features = [
Expand Down
4 changes: 2 additions & 2 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use std::{
target_env = "gnu",
feature = "dhat"
))]
use jemallocator as _;
use rusty_alloc_api as _;

#[cfg(all(
target_arch = "x86_64",
Expand All @@ -63,7 +63,7 @@ use jemallocator as _;
not(feature = "dhat")
))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
static ALLOC: rusty_alloc_api::RustyAlloc = rusty_alloc_api::RustyAlloc;

#[cfg(all(any(target_os = "windows", target_os = "macos"), feature = "dhat"))]
use mimalloc_safe as _;
Expand Down
2 changes: 1 addition & 1 deletion core/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ test-case.workspace = true
husky-rs.workspace = true

[target.x86_64-unknown-linux-gnu.dev-dependencies]
jemallocator.workspace = true
rusty_alloc-api.workspace = true

[lib]
crate-type = ["cdylib", "lib"]
Expand Down
2 changes: 1 addition & 1 deletion core/engine/benches/full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use std::hint::black_box;
all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"),
global_allocator
)]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
static ALLOC: rusty_alloc_api::RustyAlloc = rusty_alloc_api::RustyAlloc;

fn create_realm(c: &mut Criterion) {
c.bench_function("Create Realm", move |b| {
Expand Down
2 changes: 0 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
rust-toolchain
pkg-config
];
# Required for jemalloc, see https://github.com/NixOS/nixpkgs/issues/370494 .
CFLAGS = "-DJEMALLOC_STRERROR_R_RETURNS_CHAR_WITH_GNU_SOURCE";
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";

shellHook = ''
Expand Down
Loading