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.
wilder
Tomaz Canabrava 4 years ago
parent fcc01021a8
commit 3403585b87
  1. 2
      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

Loading…
Cancel
Save