Add optional support to use jemalloc as allocator

This commit is contained in:
Jeremy Soller 2024-11-15 11:10:30 -07:00
parent 49595d87f3
commit b76484457f
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
3 changed files with 56 additions and 26 deletions

View file

@ -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()
}