feat: Use the jemalloc global allocator in examples

This commit is contained in:
Clément Renault
2019-01-01 16:37:15 +01:00
parent 6731025003
commit b070778d44
4 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,6 @@
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
use std::path::{Path, PathBuf};
use std::error::Error;
use std::borrow::Cow;

View File

@ -1,3 +1,6 @@
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
use std::collections::btree_map::{BTreeMap, Entry};
use std::iter::FromIterator;
use std::io::{self, Write};