mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Use mallocng on Linux
This commit is contained in:
parent
3cf739eca9
commit
837485974a
5 changed files with 17 additions and 1 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -91,3 +91,6 @@
|
||||||
[submodule "Telegram/lib_webview"]
|
[submodule "Telegram/lib_webview"]
|
||||||
path = Telegram/lib_webview
|
path = Telegram/lib_webview
|
||||||
url = https://github.com/desktop-app/lib_webview.git
|
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
|
PRIVATE
|
||||||
desktop-app::external_glibmm
|
desktop-app::external_glibmm
|
||||||
desktop-app::external_glib
|
desktop-app::external_glib
|
||||||
|
desktop-app::external_mallocng
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||||
|
|
|
@ -59,6 +59,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -745,6 +746,16 @@ int psFixPrevious() {
|
||||||
namespace Platform {
|
namespace Platform {
|
||||||
|
|
||||||
void start() {
|
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()));
|
LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName()));
|
||||||
|
|
||||||
qputenv("PULSE_PROP_application.name", AppName.utf8());
|
qputenv("PULSE_PROP_application.name", AppName.utf8());
|
||||||
|
|
1
Telegram/ThirdParty/mallocng
vendored
Submodule
1
Telegram/ThirdParty/mallocng
vendored
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 5db0b72cd85b20aec790fccdd31c17111afc7c94
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
||||||
Subproject commit 1720a174c4d96bc1512837adcae257c6637438e5
|
Subproject commit 5318ac7c54dbf33b17ccc4bd3281bb8b8db25e02
|
Loading…
Add table
Reference in a new issue