perf: set static mmap threshold on gnu target env by default

This commit is contained in:
Michael Aaron Murphy 2025-02-12 18:30:32 +01:00 committed by Jeremy Soller
parent 9426a985c6
commit f59eb77252
5 changed files with 34 additions and 6 deletions

View file

@ -138,7 +138,11 @@ pub(crate) fn iced_settings<App: Application>(
///
/// Returns error on application failure.
pub fn run<App: Application>(settings: Settings, flags: App::Flags) -> iced::Result {
let default_font = settings.default_font;
#[cfg(target_env = "gnu")]
if let Some(threshold) = settings.default_mmap_threshold {
crate::malloc::limit_mmap_threshold(threshold);
}
let (settings, mut flags, window_settings) = iced_settings::<App>(settings, flags);
#[cfg(not(feature = "multi-window"))]
{