show jemalloc

This commit is contained in:
Aleksey Kladov 2019-01-26 21:12:16 +03:00
parent 09b5dc8e02
commit c7f4e3a401
4 changed files with 73 additions and 1 deletions

View file

@ -59,6 +59,11 @@ pub use ra_db::{
Canceled, CrateGraph, CrateId, FileId, FilePosition, FileRange, SourceRootId
};
// We use jemalloc mainly to get heap usage statistics, actual performance
// differnece is not measures.
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
pub type Cancelable<T> = Result<T, Canceled>;
#[derive(Default)]