Add optional support to use jemalloc as allocator
This commit is contained in:
parent
49595d87f3
commit
b76484457f
3 changed files with 56 additions and 26 deletions
|
|
@ -1,3 +1,10 @@
|
|||
#[cfg(feature = "jemalloc")]
|
||||
use tikv_jemallocator::Jemalloc;
|
||||
|
||||
#[cfg(feature = "jemalloc")]
|
||||
#[global_allocator]
|
||||
static GLOBAL: Jemalloc = Jemalloc;
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
cosmic_files::main()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue