Skip to content

Commit bc5a248

Browse files
committed
feat: swapped default allocator for mimmaloc
Signed-off-by: Martin <martin@hotmail.com.br>
1 parent 4bfbef5 commit bc5a248

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ compact_str = { version = "0.8.0-beta", features = ["serde"] }
3636
enum-map = "3.0.0-beta.2"
3737
fnv = "^1"
3838
drop_bomb = "0.1.5"
39+
mimalloc = { version = "0.1", default-features = false }
40+
3941
httparse = "1.8"
4042
memchr = "^2"
4143
drop_bomb = "0.1.5"

src/bin/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ use tokio::io::{AsyncReadExt, AsyncWriteExt};
77
use tokio::net::{TcpListener, UnixListener};
88
use tokio_postgres::NoTls;
99

10+
#[global_allocator]
11+
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
12+
1013
#[tokio::main]
1114
async fn main() {
1215
run().await

0 commit comments

Comments
 (0)