From 3403585b87bf633efc7d217045bc6be2b63fc93e Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 15 Nov 2021 16:19:11 +0100 Subject: [PATCH] Use malloc_trim only on linux This is not the correct fix but a temporary one, this allow us to compile on freebsd while a better fix is in the works. --- src/Screen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Screen.cpp b/src/Screen.cpp index da44e4fe..43b24475 100644 --- a/src/Screen.cpp +++ b/src/Screen.cpp @@ -1703,10 +1703,12 @@ void Screen::setScroll(const HistoryType &t, bool copyPreviousScroll) t.scroll(_history); } +#ifdef Q_OS_LINUX #ifdef __GNUC__ // We might have been using gigabytes of memory, so make sure it is actually released malloc_trim(0); #endif +#endif } bool Screen::hasScroll() const