2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

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

View File

@@ -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());