improvement: use jemalloc for lower memory usage
This commit is contained in:
parent
4ef995cf7d
commit
f88523988e
3 changed files with 132 additions and 143 deletions
|
@ -25,6 +25,13 @@ use tracing_subscriber::{prelude::*, EnvFilter};
|
|||
pub use conduit::*; // Re-export everything from the library crate
|
||||
pub use rocket::State;
|
||||
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
use tikv_jemallocator::Jemalloc;
|
||||
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: Jemalloc = Jemalloc;
|
||||
|
||||
fn setup_rocket(config: Figment, data: Arc<RwLock<Database>>) -> rocket::Rocket<rocket::Build> {
|
||||
rocket::custom(config)
|
||||
.manage(data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue