On at least OpenBSD, malloc(3) is preferred to other implementations like jemalloc for various reasons. It is common for portable third-party software (ports) to provide a switch for en/disabling jemalloc. tdesktop makes this easy since it does not contain any (je)malloc specific code (anymore). Introduce a new default-off option that disables jemalloc when enabled explicitly; this also allow developers and package maintainers more easily to try different malloc implementations, e.g. for debugging. Memory leaks reported in the slightly old issue "The app consumes an unexpectedly large amount of RAM" https://github.com/telegramdesktop/tdesktop/issues/16084 could not be reproduced on OpenBSD/amd64 with malloc(3) using tdesktop >= 3.3.1.
24 lines
754 B
CMake
24 lines
754 B
CMake
# This file is part of Desktop App Toolkit,
|
|
# a set of libraries for developing nice desktop applications.
|
|
#
|
|
# For license and copyright information please follow this link:
|
|
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
|
|
|
add_subdirectory(external)
|
|
if (LINUX AND NOT DESKTOP_APP_DISABLE_JEMALLOC)
|
|
add_subdirectory(linux_jemalloc_helper)
|
|
endif()
|
|
if (LINUX AND NOT DESKTOP_APP_USE_PACKAGED)
|
|
add_subdirectory(linux_xcb_helper)
|
|
endif()
|
|
if (LINUX
|
|
AND NOT DESKTOP_APP_USE_PACKAGED
|
|
AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
|
add_subdirectory(linux_wayland_helper)
|
|
endif()
|
|
if (DESKTOP_APP_USE_ALLOCATION_TRACER)
|
|
add_subdirectory(linux_allocation_tracer)
|
|
endif()
|
|
if (WIN32)
|
|
add_subdirectory(win_directx_helper)
|
|
endif()
|