Merge pull request #803 from pop-os/libcosmic
chore: update libcosmic with mmap threshold fix
This commit is contained in:
commit
a092aa2383
4 changed files with 34 additions and 95 deletions
|
|
@ -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