diff OrthancServer/CMakeLists.txt @ 4366:6a39ca7083b9

New config option "MallocArenaMax" to control memory usage on GNU/Linux
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Dec 2020 09:32:39 +0100
parents 799c0c527ced
children d9473bd5ed43
line wrap: on
line diff
--- a/OrthancServer/CMakeLists.txt	Wed Dec 09 16:46:10 2020 +0100
+++ b/OrthancServer/CMakeLists.txt	Thu Dec 10 09:32:39 2020 +0100
@@ -284,6 +284,15 @@
 ## Configuration of the C/C++ macros
 #####################################################################
 
+check_symbol_exists(mallopt "malloc.h" HAVE_MALLOPT)
+
+if (HAVE_MALLOPT)
+  add_definitions(-DHAVE_MALLOPT=1)
+else()
+  add_definitions(-DHAVE_MALLOPT=0)
+endif()
+
+
 if (STATIC_BUILD)
   add_definitions(-DORTHANC_STATIC=1)
 else()