mirror of
https://github.com/bootandy/dust.git
synced 2025-12-05 20:40:11 -08:00
fix: update use of sysinfo.system
System is now much quicker to start but requires an explicit call to refresh memory else it deafults to 0 (oops)
This commit is contained in:
@@ -208,8 +208,8 @@ fn main() {
|
||||
|
||||
fn init_rayon() -> Result<(), ThreadPoolBuildError> {
|
||||
let large_stack = usize::pow(1024, 3);
|
||||
// Warning: Creating System is slow, takes ~ 100ms
|
||||
let s = System::new();
|
||||
let mut s = System::new();
|
||||
s.refresh_memory();
|
||||
let available = s.available_memory();
|
||||
|
||||
if available > large_stack.try_into().unwrap() {
|
||||
|
||||
Reference in New Issue
Block a user