Browse Source

use snmalloc allocator (#5470)

Nikolay Kim 5 years ago
parent
commit
4ecad2b7fa

+ 1 - 0
frameworks/Rust/actix/Cargo.toml

@@ -32,6 +32,7 @@ actix-codec = "0.2.0"
 actix-server = "1.0.0"
 actix-service = "1.0.1"
 jemallocator = "0.3.2"
+snmalloc-rs = "0.2.3"
 askama = "0.8"
 markup = "0.4.1"
 yarte = "0.3"

+ 3 - 1
frameworks/Rust/actix/actix-core.dockerfile

@@ -1,4 +1,6 @@
-FROM rust:1.40
+FROM rust:1.41
+
+RUN apt update -yqq && apt install -yqq cmake g++
 
 ADD ./ /actix
 WORKDIR /actix

+ 3 - 1
frameworks/Rust/actix/actix-diesel.dockerfile

@@ -1,4 +1,6 @@
-FROM rust:1.40
+FROM rust:1.41
+
+RUN apt update -yqq && apt install -yqq cmake g++
 
 ADD ./ /actix
 WORKDIR /actix

+ 2 - 0
frameworks/Rust/actix/actix-pg.dockerfile

@@ -1,5 +1,7 @@
 FROM rust:1.40
 
+RUN apt update -yqq && apt install -yqq cmake g++
+
 ADD ./ /actix
 WORKDIR /actix
 

+ 3 - 1
frameworks/Rust/actix/actix-raw.dockerfile

@@ -1,4 +1,6 @@
-FROM rust:1.40
+FROM rust:1.41
+
+RUN apt update -yqq && apt install -yqq cmake g++
 
 ADD ./ /actix
 WORKDIR /actix

+ 3 - 1
frameworks/Rust/actix/actix.dockerfile

@@ -1,4 +1,6 @@
-FROM rust:1.40
+FROM rust:1.41
+
+RUN apt update -yqq && apt install -yqq cmake g++
 
 ADD ./ /actix
 WORKDIR /actix

+ 1 - 1
frameworks/Rust/actix/src/main.rs

@@ -1,5 +1,5 @@
 #[global_allocator]
-static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
+static ALLOC: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc;
 
 #[macro_use]
 extern crate serde_derive;

+ 1 - 1
frameworks/Rust/actix/src/main_diesel.rs

@@ -1,5 +1,5 @@
 #[global_allocator]
-static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
+static ALLOC: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc;
 
 #[macro_use]
 extern crate serde_derive;

+ 1 - 1
frameworks/Rust/actix/src/main_platform.rs

@@ -1,5 +1,5 @@
 #[global_allocator]
-static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
+static ALLOC: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc;
 
 #[macro_use]
 extern crate serde_derive;

+ 1 - 1
frameworks/Rust/actix/src/main_raw.rs

@@ -1,5 +1,5 @@
 #[global_allocator]
-static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
+static ALLOC: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc;
 
 #[macro_use]
 extern crate serde_derive;