Skip to content

Commit 8c72a0d

Browse files
authored
Move setting up jemalloc out of library crate (#60)
1 parent a951ba4 commit 8c72a0d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222

2323
use pyo3::{exceptions, prelude::*};
2424

25-
#[cfg(feature = "jemalloc")]
26-
#[global_allocator]
27-
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
28-
2925
use clap::{crate_authors, crate_description, crate_name, crate_version, value_t, App, Arg};
3026
use indicatif::{ProgressBar, ProgressStyle};
3127
use rayon::prelude::*;

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
//! Synapse instance's database. Specifically, it aims to reduce the number of
1717
//! rows that a given room takes up in the `state_groups_state` table.
1818
19+
#[cfg(feature = "jemalloc")]
20+
#[global_allocator]
21+
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
22+
1923
use synapse_compress_state as comp_state;
2024

2125
fn main() {

0 commit comments

Comments
 (0)