diff --git a/CHANGELOG.md b/CHANGELOG.md index aaa04f4..737404b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# jemalloc-sys 0.5.2 - 2022-09-29 + +- Fix build on riscv64gc-unknown-linux-gnu (#40) + # jemalloc-sys 0.5.1 - 2022-06-22 - Backport support for NetBSD (#31) diff --git a/jemalloc-ctl/src/keys.rs b/jemalloc-ctl/src/keys.rs index 24ca1f1..6acbe1c 100644 --- a/jemalloc-ctl/src/keys.rs +++ b/jemalloc-ctl/src/keys.rs @@ -31,7 +31,7 @@ use crate::{fmt, ops, raw}; /// A `Name` in the _MALLCTL NAMESPACE_. #[repr(transparent)] -#[derive(PartialEq)] +#[derive(PartialEq, Eq)] pub struct Name([u8]); /// Converts a null-terminated byte-string into a [`Name`]. @@ -132,12 +132,12 @@ impl fmt::Display for Name { /// Management Information Base of a non-string value. #[repr(transparent)] -#[derive(Copy, Clone, PartialEq, Debug, Default)] +#[derive(Copy, Clone, PartialEq, Eq, Debug, Default)] pub struct Mib(T); /// Management Information Base of a string value. #[repr(transparent)] -#[derive(Copy, Clone, PartialEq, Debug, Default)] +#[derive(Copy, Clone, PartialEq, Eq, Debug, Default)] pub struct MibStr(T); impl AsRef<[usize]> for Mib { diff --git a/jemalloc-sys/Cargo.toml b/jemalloc-sys/Cargo.toml index c408104..ab72f34 100644 --- a/jemalloc-sys/Cargo.toml +++ b/jemalloc-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jemalloc-sys" -version = "0.5.1+5.3.0-patched" +version = "0.5.2+5.3.0-patched" authors = [ "Alex Crichton ", "Gonzalo Brito Gadeschi ", diff --git a/jemalloc-sys/README.md b/jemalloc-sys/README.md index a7f317c..dfd5feb 100644 --- a/jemalloc-sys/README.md +++ b/jemalloc-sys/README.md @@ -96,10 +96,10 @@ hyphens `-` are replaced with underscores `_`(see run-time options string that is processed prior to the `malloc_conf` global variable, the `/etc/malloc.conf` symlink, and the `MALLOC_CONF` environment variable (note: this variable might be prefixed as `_RJEM_MALLOC_CONF`). For - example, to change the default decay time to 30 seconds: + example, to change the default decay time for dirty pages to 30 seconds: ``` - JEMALLOC_SYS_WITH_MALLOC_CONF=decay_ms:30000 + JEMALLOC_SYS_WITH_MALLOC_CONF=dirty_decay_ms:30000 ``` * `JEMALLOC_SYS_WITH_LG_PAGE=`: Specify the base 2 log of the allocator diff --git a/jemalloc-sys/build.rs b/jemalloc-sys/build.rs index 92382ec..d8495a8 100644 --- a/jemalloc-sys/build.rs +++ b/jemalloc-sys/build.rs @@ -188,11 +188,10 @@ fn main() { } if let Ok(malloc_conf_opts) = read_and_watch_env("JEMALLOC_SYS_WITH_MALLOC_CONF") { - malloc_conf += &format!( - "{}{}", - if malloc_conf.is_empty() { "" } else { "," }, - malloc_conf_opts - ); + if !malloc_conf.is_empty() { + malloc_conf.push(','); + } + malloc_conf.push_str(&malloc_conf_opts); } if !malloc_conf.is_empty() { @@ -343,6 +342,7 @@ fn gnu_target(target: &str) -> String { "i686-pc-windows-gnu" => "i686-w64-mingw32".to_string(), "x86_64-pc-windows-gnu" => "x86_64-w64-mingw32".to_string(), "armv7-linux-androideabi" => "arm-linux-androideabi".to_string(), + "riscv64gc-unknown-linux-gnu" => "riscv64-linux-gnu".to_string(), s => s.to_string(), } }