diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-09-20 10:06:45 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-09-20 10:06:45 +0200 |
| commit | 55089c47038fd0f50bb422edba5f133f03b08ee9 (patch) | |
| tree | 60af1791150c237ca0a7a69db3fe007ec7819e58 | |
| parent | 52589a599118e1e6690d7f888b35b245cc04af93 (diff) | |
| download | mullvadvpn-55089c47038fd0f50bb422edba5f133f03b08ee9.tar.xz mullvadvpn-55089c47038fd0f50bb422edba5f133f03b08ee9.zip | |
Set the global allocator to the system default one
| -rw-r--r-- | mullvad-cli/src/main.rs | 7 | ||||
| -rw-r--r-- | mullvad-problem-report/src/main.rs | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/mullvad-cli/src/main.rs b/mullvad-cli/src/main.rs index 0cf9e9307a..d83556197e 100644 --- a/mullvad-cli/src/main.rs +++ b/mullvad-cli/src/main.rs @@ -22,8 +22,15 @@ mod cmds; use mullvad_ipc_client::{new_standalone_ipc_client, DaemonRpcClient}; + +use std::alloc::System; use std::io; + +#[global_allocator] +static GLOBAL: System = System; + + error_chain! { foreign_links { Io(io::Error); diff --git a/mullvad-problem-report/src/main.rs b/mullvad-problem-report/src/main.rs index b881c9d8d5..85cb81f94e 100644 --- a/mullvad-problem-report/src/main.rs +++ b/mullvad-problem-report/src/main.rs @@ -22,6 +22,7 @@ extern crate mullvad_rpc; use error_chain::ChainedError; use regex::Regex; +use std::alloc::System; use std::borrow::Cow; use std::cmp::min; use std::collections::{HashMap, HashSet}; @@ -30,6 +31,11 @@ use std::fs::{self, File}; use std::io::{self, BufWriter, Read, Seek, SeekFrom, Write}; use std::path::{Path, PathBuf}; + +#[global_allocator] +static GLOBAL: System = System; + + mod metadata; /// Maximum number of bytes to read from each log file |
