jemalloc-sys: bump 0.5.3 (#48)
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
This commit is contained in:
parent
725713e565
commit
444e0efb81
|
@ -1,3 +1,7 @@
|
|||
# jemalloc-sys 0.5.3 - 2023-02-03
|
||||
|
||||
- Remove fs-extra dependency (#47)
|
||||
|
||||
# jemalloc-sys 0.5.2 - 2022-09-29
|
||||
|
||||
- Fix build on riscv64gc-unknown-linux-gnu (#40)
|
||||
|
|
|
@ -34,8 +34,8 @@ impl fmt::Debug for Error {
|
|||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let code = self.0.get() as c_int;
|
||||
match description(code) {
|
||||
Some(m) => write!(f, "{}", m),
|
||||
None => write!(f, "Unknown error code: \"{}\".", code),
|
||||
Some(m) => write!(f, "{m}"),
|
||||
None => write!(f, "Unknown error code: \"{code}\"."),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
//! }
|
||||
//! ```
|
||||
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
||||
use crate::error::Result;
|
||||
use crate::std::str;
|
||||
use crate::{fmt, ops, raw};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "tikv-jemalloc-sys"
|
||||
version = "0.5.2+5.3.0-patched"
|
||||
version = "0.5.3+5.3.0-patched"
|
||||
authors = [
|
||||
"Alex Crichton <alex@alexcrichton.com>",
|
||||
"Gonzalo Brito Gadeschi <gonzalobg88@gmail.com>",
|
||||
|
|
|
@ -29,12 +29,12 @@ macro_rules! warning {
|
|||
}
|
||||
|
||||
fn read_and_watch_env(name: &str) -> Result<String, env::VarError> {
|
||||
println!("cargo:rerun-if-env-changed={}", name);
|
||||
println!("cargo:rerun-if-env-changed={name}");
|
||||
env::var(name)
|
||||
}
|
||||
|
||||
fn read_and_watch_env_os(name: &str) -> Option<OsString> {
|
||||
println!("cargo:rerun-if-env-changed={}", name);
|
||||
println!("cargo:rerun-if-env-changed={name}");
|
||||
env::var_os(name)
|
||||
}
|
||||
|
||||
|
@ -212,27 +212,27 @@ fn main() {
|
|||
|
||||
if !malloc_conf.is_empty() {
|
||||
info!("--with-malloc-conf={}", malloc_conf);
|
||||
cmd.arg(format!("--with-malloc-conf={}", malloc_conf));
|
||||
cmd.arg(format!("--with-malloc-conf={malloc_conf}"));
|
||||
}
|
||||
|
||||
if let Ok(lg_page) = read_and_watch_env("JEMALLOC_SYS_WITH_LG_PAGE") {
|
||||
info!("--with-lg-page={}", lg_page);
|
||||
cmd.arg(format!("--with-lg-page={}", lg_page));
|
||||
cmd.arg(format!("--with-lg-page={lg_page}"));
|
||||
}
|
||||
|
||||
if let Ok(lg_hugepage) = read_and_watch_env("JEMALLOC_SYS_WITH_LG_HUGEPAGE") {
|
||||
info!("--with-lg-hugepage={}", lg_hugepage);
|
||||
cmd.arg(format!("--with-lg-hugepage={}", lg_hugepage));
|
||||
cmd.arg(format!("--with-lg-hugepage={lg_hugepage}"));
|
||||
}
|
||||
|
||||
if let Ok(lg_quantum) = read_and_watch_env("JEMALLOC_SYS_WITH_LG_QUANTUM") {
|
||||
info!("--with-lg-quantum={}", lg_quantum);
|
||||
cmd.arg(format!("--with-lg-quantum={}", lg_quantum));
|
||||
cmd.arg(format!("--with-lg-quantum={lg_quantum}"));
|
||||
}
|
||||
|
||||
if let Ok(lg_vaddr) = read_and_watch_env("JEMALLOC_SYS_WITH_LG_VADDR") {
|
||||
info!("--with-lg-vaddr={}", lg_vaddr);
|
||||
cmd.arg(format!("--with-lg-vaddr={}", lg_vaddr));
|
||||
cmd.arg(format!("--with-lg-vaddr={lg_vaddr}"));
|
||||
}
|
||||
|
||||
if use_prefix {
|
||||
|
@ -336,7 +336,7 @@ fn run(cmd: &mut Command) {
|
|||
}
|
||||
|
||||
fn execute(cmd: &mut Command, on_fail: impl FnOnce()) {
|
||||
println!("running: {:?}", cmd);
|
||||
println!("running: {cmd:?}");
|
||||
let status = match cmd.status() {
|
||||
Ok(status) => status,
|
||||
Err(e) => panic!("failed to execute command: {}", e),
|
||||
|
|
|
@ -15,15 +15,9 @@ fn background_threads_runtime_defaults() {
|
|||
if !cfg!(feature = "background_threads_runtime_support") {
|
||||
// If the crate was compiled without background thread support,
|
||||
// then background threads are always disabled at run-time by default:
|
||||
assert_eq!(background_threads(), false);
|
||||
assert!(!background_threads());
|
||||
return;
|
||||
}
|
||||
|
||||
if cfg!(feature = "background_threads") {
|
||||
// The crate was compiled with background-threads enabled by default:
|
||||
assert_eq!(background_threads(), true);
|
||||
} else {
|
||||
// The crate was compiled with background-threads disabled by default:
|
||||
assert_eq!(background_threads(), false);
|
||||
}
|
||||
assert_eq!(background_threads(), cfg!(feature = "background_threads"));
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ static A: Jemalloc = Jemalloc;
|
|||
fn smoke() {
|
||||
let layout = Layout::from_size_align(100, 8).unwrap();
|
||||
unsafe {
|
||||
let ptr = Jemalloc.alloc(layout.clone());
|
||||
let ptr = Jemalloc.alloc(layout);
|
||||
assert!(!ptr.is_null());
|
||||
Jemalloc.dealloc(ptr, layout);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ static A: Jemalloc = Jemalloc;
|
|||
#[test]
|
||||
fn smoke() {
|
||||
let mut a = Vec::new();
|
||||
a.reserve(1);
|
||||
a.push(3);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue