GlobalDlMalloc not found in version 0.2.4
hskang9 opened this issue · 4 comments
hskang9 commented
why
error[E0425]: cannot find value `GlobalDlmalloc` in crate `dlmalloc`
--> engine/src/lib.rs:36:52
|
36 | static ALLOC: dlmalloc::GlobalDlmalloc = dlmalloc::GlobalDlmalloc;
hskang9 commented
hskang9 commented
RUSTSEC recommends this cargo to be used. Could you write a guide on how to integrate?
erwanvivien commented
Hello @hskang9
I think you forgot to use the global
feature in Cargo.toml
:
dlmalloc = { version = "0.2.4", features = ["global"] }
and in libs.rs
static ALLOC: dlmalloc::GlobalDlmalloc = dlmalloc::GlobalDlmalloc;
works for me :)
erwanvivien commented
Please @alexcrichton, close this issue