diff --git a/Cargo.lock b/Cargo.lock index 3928ee9..d64b0d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -68,12 +68,6 @@ dependencies = [ "regex-automata", ] -[[package]] -name = "cc" -version = "1.0.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" - [[package]] name = "cfg-if" version = "1.0.0" @@ -338,9 +332,9 @@ dependencies = [ [[package]] name = "ntapi" -version = "0.3.7" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" +checksum = "bc51db7b362b205941f71232e56c625156eb9a929f8cf74a428fd5bc094a4afc" dependencies = [ "winapi", ] @@ -543,14 +537,12 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.15.9" +version = "0.26.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de94457a09609f33fec5e7fceaf907488967c6c7c75d64da6a7ce6ffdb8b5abd" +checksum = "c375d5fd899e32847b8566e10598d6e9f1d9b55ec6de3cdf9e7da4bdc51371bc" dependencies = [ - "cc", "cfg-if", "core-foundation-sys", - "doc-comment", "libc", "ntapi", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index 887dbc6..a566102 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ regex = "1" config-file = "0.2" serde = { version = "1.0", features = ["derive"] } directories = "4" -sysinfo = "0.15" +sysinfo = "0.26" [target.'cfg(windows)'.dependencies] winapi-util = "0.1" diff --git a/src/main.rs b/src/main.rs index 78a2a06..d470098 100644 --- a/src/main.rs +++ b/src/main.rs @@ -210,7 +210,7 @@ fn init_rayon() -> Result<(), ThreadPoolBuildError> { let large_stack = usize::pow(1024, 3); // Warning: Creating System is slow, takes ~ 100ms let s = System::new(); - let available = s.get_available_memory() * 1024; + let available = s.available_memory(); if available > large_stack.try_into().unwrap() { // Larger stack size to handle cases with lots of nested directories