aports/testing/qt-creator/fix-malloc-trim.patch

11 lines
405 B
Diff

--- a/src/plugins/coreplugin/icore.cpp
+++ b/src/plugins/coreplugin/icore.cpp
@@ -1414,7 +1414,7 @@
using namespace std::chrono_literals;
m_trimTimer.setInterval(60s);
// glibc may not actually free memory in free().
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) && defined(__GLIBC__)
connect(&m_trimTimer, &QTimer::timeout, this, [] { malloc_trim(0); });
#endif
}