Fix: Only create large stack size if enough memory

Small boxes do not have enough memory to create a large stack

Conversely we want a large stack size for large boxes with a very highly
nested directory structure.

Version: New version
This commit is contained in:
andy.boot
2022-08-25 08:56:30 +01:00
parent c148cd9044
commit c363e5ff8b
3 changed files with 61 additions and 7 deletions

41
Cargo.lock generated
View File

@@ -68,6 +68,12 @@ 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"
@@ -118,6 +124,12 @@ dependencies = [
"toml",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
[[package]]
name = "crossbeam-channel"
version = "0.5.6"
@@ -197,7 +209,7 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
[[package]]
name = "du-dust"
version = "0.8.2"
version = "0.8.3"
dependencies = [
"ansi_term",
"assert_cmd",
@@ -210,6 +222,7 @@ dependencies = [
"regex",
"serde",
"stfu8",
"sysinfo",
"tempfile",
"terminal_size",
"thousands",
@@ -322,6 +335,15 @@ dependencies = [
"autocfg",
]
[[package]]
name = "ntapi"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f"
dependencies = [
"winapi",
]
[[package]]
name = "num_cpus"
version = "1.13.1"
@@ -518,6 +540,23 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "sysinfo"
version = "0.15.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de94457a09609f33fec5e7fceaf907488967c6c7c75d64da6a7ce6ffdb8b5abd"
dependencies = [
"cc",
"cfg-if",
"core-foundation-sys",
"doc-comment",
"libc",
"ntapi",
"once_cell",
"rayon",
"winapi",
]
[[package]]
name = "tempfile"
version = "3.3.0"