chore: update libcosmic with mmap threshold fix
This commit is contained in:
parent
17b0c665e7
commit
64c591ed19
4 changed files with 34 additions and 95 deletions
96
Cargo.lock
generated
96
Cargo.lock
generated
|
|
@ -348,8 +348,6 @@ version = "0.8.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093"
|
||||
dependencies = [
|
||||
"async-fs",
|
||||
"async-net",
|
||||
"enumflags2",
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
|
|
@ -498,17 +496,6 @@ dependencies = [
|
|||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-net"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7"
|
||||
dependencies = [
|
||||
"async-io 2.4.0",
|
||||
"blocking",
|
||||
"futures-lite 2.6.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-process"
|
||||
version = "1.8.1"
|
||||
|
|
@ -699,12 +686,6 @@ dependencies = [
|
|||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.21.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.22.1"
|
||||
|
|
@ -1225,7 +1206,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-client-toolkit"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/cosmic-protocols?rev=d218c76#d218c76b58c7a3b20dd5e7943f93fc306a1b81b8"
|
||||
source = "git+https://github.com/pop-os/cosmic-protocols?rev=29ab323#29ab32305c6457fccf0728caaaf79fcac4cca665"
|
||||
dependencies = [
|
||||
"cosmic-protocols",
|
||||
"libc",
|
||||
|
|
@ -1237,7 +1218,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-config"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"atomicwrites",
|
||||
"cosmic-config-derive",
|
||||
|
|
@ -1256,7 +1237,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-config-derive"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
|
|
@ -1283,7 +1264,7 @@ dependencies = [
|
|||
"icu_collator",
|
||||
"icu_provider",
|
||||
"ignore",
|
||||
"image 0.25.5",
|
||||
"image",
|
||||
"libc",
|
||||
"libcosmic",
|
||||
"liblzma",
|
||||
|
|
@ -1328,8 +1309,8 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cosmic-freedesktop-icons"
|
||||
version = "0.2.6"
|
||||
source = "git+https://github.com/pop-os/freedesktop-icons#bfc22d531596b57646dc47bcd70b2eb6f3152cd4"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/pop-os/freedesktop-icons#98f78d49022c893be2e974e95d95aaea963a6833"
|
||||
dependencies = [
|
||||
"dirs 5.0.1",
|
||||
"ini_core",
|
||||
|
|
@ -1353,7 +1334,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-protocols"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/cosmic-protocols?rev=d218c76#d218c76b58c7a3b20dd5e7943f93fc306a1b81b8"
|
||||
source = "git+https://github.com/pop-os/cosmic-protocols?rev=29ab323#29ab32305c6457fccf0728caaaf79fcac4cca665"
|
||||
dependencies = [
|
||||
"bitflags 2.7.0",
|
||||
"wayland-backend",
|
||||
|
|
@ -1367,7 +1348,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-text"
|
||||
version = "0.12.1"
|
||||
source = "git+https://github.com/pop-os/cosmic-text.git#166b59f560c551dab391a864f7c1f503c1e18446"
|
||||
source = "git+https://github.com/pop-os/cosmic-text.git#9125dd48b771e9aa7833d106a9850e935f71eaa6"
|
||||
dependencies = [
|
||||
"bitflags 2.7.0",
|
||||
"fontdb 0.16.2",
|
||||
|
|
@ -1389,7 +1370,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-theme"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"almost",
|
||||
"cosmic-config",
|
||||
|
|
@ -2811,7 +2792,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced"
|
||||
version = "0.14.0-dev"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"dnd",
|
||||
"iced_accessibility",
|
||||
|
|
@ -2820,7 +2801,7 @@ dependencies = [
|
|||
"iced_renderer",
|
||||
"iced_widget",
|
||||
"iced_winit",
|
||||
"image 0.24.9",
|
||||
"image",
|
||||
"mime 0.1.0",
|
||||
"thiserror 1.0.69",
|
||||
"window_clipboard",
|
||||
|
|
@ -2829,7 +2810,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_accessibility"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"accesskit_winit",
|
||||
|
|
@ -2838,7 +2819,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_core"
|
||||
version = "0.14.0-dev"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"bitflags 2.7.0",
|
||||
"bytes",
|
||||
|
|
@ -2862,7 +2843,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_futures"
|
||||
version = "0.14.0-dev"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"iced_core",
|
||||
|
|
@ -2888,7 +2869,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_graphics"
|
||||
version = "0.14.0-dev"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"bitflags 2.7.0",
|
||||
"bytemuck",
|
||||
|
|
@ -2896,7 +2877,7 @@ dependencies = [
|
|||
"half",
|
||||
"iced_core",
|
||||
"iced_futures",
|
||||
"image 0.24.9",
|
||||
"image",
|
||||
"kamadak-exif",
|
||||
"log",
|
||||
"lyon_path",
|
||||
|
|
@ -2910,7 +2891,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_renderer"
|
||||
version = "0.14.0-dev"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"iced_graphics",
|
||||
"iced_tiny_skia",
|
||||
|
|
@ -2922,7 +2903,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_runtime"
|
||||
version = "0.14.0-dev"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"cosmic-client-toolkit",
|
||||
|
|
@ -2937,7 +2918,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_tiny_skia"
|
||||
version = "0.14.0-dev"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"cosmic-text",
|
||||
|
|
@ -2953,7 +2934,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_wgpu"
|
||||
version = "0.14.0-dev"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"as-raw-xcb-connection",
|
||||
"bitflags 2.7.0",
|
||||
|
|
@ -2984,7 +2965,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_widget"
|
||||
version = "0.14.0-dev"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"cosmic-client-toolkit",
|
||||
"dnd",
|
||||
|
|
@ -3002,7 +2983,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_winit"
|
||||
version = "0.14.0-dev"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"cosmic-client-toolkit",
|
||||
"dnd",
|
||||
|
|
@ -3214,24 +3195,6 @@ dependencies = [
|
|||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "image"
|
||||
version = "0.24.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"byteorder",
|
||||
"color_quant",
|
||||
"exr",
|
||||
"gif",
|
||||
"jpeg-decoder",
|
||||
"num-traits",
|
||||
"png",
|
||||
"qoi",
|
||||
"tiff",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "image"
|
||||
version = "0.25.5"
|
||||
|
|
@ -3475,9 +3438,6 @@ name = "jpeg-decoder"
|
|||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0"
|
||||
dependencies = [
|
||||
"rayon",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
|
|
@ -3598,7 +3558,7 @@ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
|
|||
[[package]]
|
||||
name = "libcosmic"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6"
|
||||
source = "git+https://github.com/pop-os/libcosmic.git#f59eb77252d1730319d532fc0a0c50ce860edd9d"
|
||||
dependencies = [
|
||||
"apply",
|
||||
"ashpd 0.9.2",
|
||||
|
|
@ -3619,6 +3579,7 @@ dependencies = [
|
|||
"iced_wgpu",
|
||||
"iced_widget",
|
||||
"iced_winit",
|
||||
"image",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"mime 0.3.17",
|
||||
|
|
@ -5295,14 +5256,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ron"
|
||||
version = "0.8.1"
|
||||
version = "0.9.0-alpha.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94"
|
||||
checksum = "7644a2a539ff7fa991c8f4652373cd722d387e39229415103243914249730836"
|
||||
dependencies = [
|
||||
"base64 0.21.7",
|
||||
"base64",
|
||||
"bitflags 2.7.0",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -6481,7 +6443,7 @@ version = "0.42.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b84ea542ae85c715f07b082438a4231c3760539d902e11d093847a0b22963032"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"base64",
|
||||
"data-url",
|
||||
"flate2",
|
||||
"fontdb 0.18.0",
|
||||
|
|
|
|||
|
|
@ -1,28 +1,6 @@
|
|||
mod file_manager;
|
||||
|
||||
/// Access glibc malloc tunables.
|
||||
#[cfg(target_env = "gnu")]
|
||||
mod malloc {
|
||||
use std::os::raw::c_int;
|
||||
|
||||
const M_MMAP_THRESHOLD: c_int = -3;
|
||||
|
||||
extern "C" {
|
||||
fn mallopt(param: c_int, value: c_int) -> c_int;
|
||||
}
|
||||
|
||||
/// Prevents glibc from hoarding memory via memory fragmentation.
|
||||
pub fn limit_mmap_threshold() {
|
||||
unsafe {
|
||||
mallopt(M_MMAP_THRESHOLD, 65536);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
#[cfg(target_env = "gnu")]
|
||||
malloc::limit_mmap_threshold();
|
||||
|
||||
//TODO: move file manager service to its own daemon?
|
||||
let _conn_res = zbus::blocking::connection::Builder::session()?
|
||||
.name("org.freedesktop.FileManager1")?
|
||||
|
|
|
|||
|
|
@ -137,6 +137,11 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
settings = settings.size_limits(Limits::NONE.min_width(360.0).min_height(180.0));
|
||||
settings = settings.exit_on_close(false);
|
||||
|
||||
#[cfg(feature = "jemalloc")]
|
||||
{
|
||||
settings = settings.default_mmap_threshold(None);
|
||||
}
|
||||
|
||||
let flags = Flags {
|
||||
config_handler,
|
||||
config,
|
||||
|
|
|
|||
|
|
@ -6,11 +6,5 @@ use tikv_jemallocator::Jemalloc;
|
|||
static GLOBAL: Jemalloc = Jemalloc;
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Prevents glibc from hoarding memory via memory fragmentation.
|
||||
#[cfg(all(not(feature = "jemalloc"), target_env = "gnu"))]
|
||||
unsafe {
|
||||
libc::mallopt(libc::M_MMAP_THRESHOLD, 65536);
|
||||
}
|
||||
|
||||
cosmic_files::main()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue