Use mallocng on Linux

This commit is contained in:
Ilya Fedin
2021-05-16 12:04:48 +04:00
committed by John Preston
parent 3cf739eca9
commit 837485974a
5 changed files with 17 additions and 1 deletions
+3
View File
@@ -91,3 +91,6 @@
[submodule "Telegram/lib_webview"]
path = Telegram/lib_webview
url = https://github.com/desktop-app/lib_webview.git
[submodule "Telegram/ThirdParty/mallocng"]
path = Telegram/ThirdParty/mallocng
url = https://github.com/desktop-app/mallocng.git
+1
View File
@@ -89,6 +89,7 @@ elseif (LINUX)
PRIVATE
desktop-app::external_glibmm
desktop-app::external_glib
desktop-app::external_mallocng
)
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
@@ -59,6 +59,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <unistd.h>
#include <dirent.h>
#include <pwd.h>
#include <malloc.h>
#include <iostream>
@@ -745,6 +746,16 @@ int psFixPrevious() {
namespace Platform {
void start() {
// avoid stripping custom allocator
malloc(0);
calloc(0, 0);
realloc(nullptr, 0);
free(nullptr);
aligned_alloc(0, 0);
malloc_usable_size(nullptr);
memalign(0, 0);
posix_memalign(nullptr, 0, 0);
LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName()));
qputenv("PULSE_PROP_application.name", AppName.utf8());
+1 -1
Submodule cmake updated: 1720a174c4...5318ac7c54