Support jemalloc in the VM
Since Rust 1.28, the default allocator is now the system allocator, instead of jemalloc. To add support for jemalloc, one must add the following to Cargo.toml
:
[dependencies]
jemallocator = { version = "^0.1", optional = true }
[features]
jemalloc = ["jemallocator"]
Then in src/lib.rs
one must add:
#[cfg(feature = "jemalloc")]
extern crate jemallocator;
#[cfg(feature = "jemalloc")]
#[global_allocator]
static A: jemallocator::Jemalloc = jemallocator::Jemalloc;
Unfortunately at the time of writing the jemallocator crate does not yet support Rust 1.28. A fix is in the Git repository, but this hasn't been released yet.
For the time being jemalloc support has been removed, but support for this should be added once jemallocator starts working again.