Skip to content

Commit 49f368e

Browse files
committed
add bump allocator option
1 parent bef76bf commit 49f368e

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

memcrs/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ minstant = "0.1.4"
4343
serde_json = "1.0.108"
4444
rayon = "1.8.0"
4545
affinity = "0.1.2"
46+
bump-allocator = "0.1.2"
4647

4748
[target.'cfg(not(target_env = "msvc"))'.dependencies]
4849
jemallocator = { version ="0.5.4", optional = true }
50+
51+
[features]
52+
bumpallocator = []

memcrs/src/bin/memcrsd.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ use jemallocator::Jemalloc;
1313
#[global_allocator]
1414
static GLOBAL: Jemalloc = Jemalloc;
1515

16+
#[cfg(feature = "bumpalo")]
17+
#[global_allocator]
18+
static GLOBAL: bump_allocator::BumpPointer = bump_allocator::BumpPointer;
19+
1620
fn get_log_level(verbose: u8) -> tracing::Level {
1721
// Vary the output based on how many times the user used the "verbose" flag
1822
// // (i.e. 'myprog -v -v -v' or 'myprog -vvv' vs 'myprog -v'

0 commit comments

Comments
 (0)