Set M_ARENA_MAX earlier

It doesn't work properly with auto-updatable builds otherwise
This commit is contained in:
Ilya Fedin
2025-12-08 09:52:30 +00:00
committed by John Preston
parent 6ea30feb18
commit c27c47dd52
2 changed files with 7 additions and 1 deletions

View File

@@ -177,7 +177,6 @@ LinuxIntegration::LinuxIntegration()
}
#ifdef __GLIBC__
mallopt(M_ARENA_MAX, 1);
_memoryTrim = QObject::connect(
QCoreApplication::eventDispatcher(),
&QAbstractEventDispatcher::aboutToBlock,

View File

@@ -14,12 +14,19 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtWidgets/QApplication>
#include <glib/glib.hpp>
#ifdef __GLIBC__
#include <malloc.h>
#endif // __GLIBC__
using namespace gi::repository;
namespace Platform {
Launcher::Launcher(int argc, char *argv[])
: Core::Launcher(argc, argv) {
#ifdef __GLIBC__
mallopt(M_ARENA_MAX, 1);
#endif // __GLIBC__
}
int Launcher::exec() {