From 4094d8d0592c507f322681b070b0fa0fefccd673 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 17 Jun 2019 18:13:31 -0700 Subject: Remove explicit change of global allocator This change removes the explicit change of the global allocator to the system allocator that we introduced a while back. The reason this was needed in the past was due to Rust's use of jemalloc in the default configuration, which increases binary size quite significantly. However, with Rust issue #36963 fixed, jemalloc is now an explicit opt-in and the system allocator is the default choice -- rendering our explicit change rather pointless. --- nitrocli/src/main.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/nitrocli/src/main.rs b/nitrocli/src/main.rs index 5cb3faf..ffc2744 100644 --- a/nitrocli/src/main.rs +++ b/nitrocli/src/main.rs @@ -79,7 +79,6 @@ mod pinentry; #[cfg(test)] mod tests; -use std::alloc; use std::env; use std::ffi; use std::io; @@ -88,13 +87,6 @@ use std::result; use crate::error::Error; -// Switch from the default allocator (typically jemalloc) to the system -// allocator (malloc based on Unix systems). Our application is by no -// means allocation intensive and the default allocator is typically -// much larger in size, causing binary bloat. -#[global_allocator] -static A: alloc::System = alloc::System; - type Result = result::Result; const NITROCLI_ADMIN_PIN: &str = "NITROCLI_ADMIN_PIN"; -- cgit v1.2.3