mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-06-02 03:53:42 +02:00
Use mallocng on Linux
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
Submodule Telegram/ThirdParty/mallocng added at 5db0b72cd8
+1
-1
Submodule cmake updated: 1720a174c4...5318ac7c54
Reference in New Issue
Block a user