Skip to content

Commit

Permalink
Merge pull request #1 from sol-farm/jemalloc
Browse files Browse the repository at this point in the history
Set Global Allocator To JemAlloc
  • Loading branch information
bonedaddy authored Aug 16, 2021
2 parents 6df5588 + b33e8d1 commit 93f06e0
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ serum_crank.tar
serum_crank.tar.gz
Makefile
README.md
my-crank.log

# regexs
**/*.txt
Expand Down
28 changes: 28 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ log = "0.4"
debug_print = "1.0.0"
tokio = {version = "0.2", features = ["full"]}
warp = "0.2"
jemallocator = "0.3.2"

[profile.release]
lto = "fat"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Docker image for serum crank using maximal rust compiler optimizations. See [ser
# Differences From Upstream

* Specifies `--url` as the RPC to connect to instead of network which ends up using public rpc infra
* Forces global allocator to use jemalloc

# Docker Image

Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ services:
NUMWORKERS: 1
RPC_URL: "https://solana-api.projectserum.com"
volumes:
- ./payer.json:/tmp/payer.json
- ./tulip_crank_logs:/logdir
- ./payer.json:/tmp/payer.json
3 changes: 3 additions & 0 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#[global_allocator]
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;

use anyhow::Result;
use clap::Clap;
use crank::Opts;
Expand Down

0 comments on commit 93f06e0

Please sign in to comment.