From 28899e32989202b0c865825d47ae4bd837a46b5d Mon Sep 17 00:00:00 2001 From: Andrew Straw Date: Thu, 13 Oct 2022 14:51:30 +0200 Subject: [PATCH] Revert "strand-cam: remove jemallocator" This reverts commit 7893896a356fe5a91e9bd6547df56e5d4d07dcf0. --- CHANGELOG.md | 3 --- strand-cam/Cargo.toml | 3 +++ strand-cam/src/cli_app.rs | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80f4ecdc2..44752fdc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,9 +36,6 @@ setting is now `start_backend = "pylon"` to enable Basler Pylon cameras to continue with existing Braid `.toml` configuration files.) * Rename command line program `offline-retrack` to `braid-offline-retrack`. -* Removed jemallocator from `strand-cam` in favor of the default rust allocator. - This was added to fix a "corrupted size vs. prev_size" error in 2019, but - seems no longer needed. * MKV and FMF files use frame timestamps computed from the triggerbox device if available. * When saving MKV, FMF and April Tag CSV files, default filenames include the diff --git a/strand-cam/Cargo.toml b/strand-cam/Cargo.toml index 85b6b46fc..31ad78539 100644 --- a/strand-cam/Cargo.toml +++ b/strand-cam/Cargo.toml @@ -11,6 +11,7 @@ rust-version = "1.60" path = "src/strand-cam.rs" [dependencies] +jemallocator = {version="0.3", optional=true} async-change-tracker = "0.3" bui-backend-types = "0.8" bui-backend = {version="0.14", default-features = false} @@ -131,6 +132,8 @@ flydratrax = ["mvg", "nalgebra", "strand-cam-pseudo-cal", "flydra-mvg", # build with the flydra-feature-detector flydra_feat_detect = ["flydra-feature-detector"] +jemalloc = ["jemallocator"] + vpx = ["mkv-writer/vpx"] use_ipp = ["flydra-feature-detector?/use_ipp"] diff --git a/strand-cam/src/cli_app.rs b/strand-cam/src/cli_app.rs index 6dfe53e3c..14e127949 100644 --- a/strand-cam/src/cli_app.rs +++ b/strand-cam/src/cli_app.rs @@ -1,3 +1,7 @@ +#[cfg(feature = "jemalloc")] +#[global_allocator] +static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; + use std::path::PathBuf; use clap::Arg;