endif()
endmacro()
+# set using memory manager option for TKernel
+set (USE_MMGR_TYPE "NATIVE" CACHE STRING "Select using memory manager tool.")
+set_property(CACHE USE_MMGR_TYPE PROPERTY STRINGS "NATIVE" "FLEXIBLE" "TBB" "JEMALLOC")
+
# include variable description
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vardescr")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE")
endif()
+# Jemalloc
+if ("${USE_MMGR_TYPE}" STREQUAL "JEMALLOC")
+ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/jemalloc")
+else()
+ OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_JEMALLOC")
+ OCCT_CHECK_AND_UNSET ("INSTALL_JEMALLOC")
+endif()
+
# qt for inspector and samples
if (BUILD_Inspector OR BUILD_SAMPLES_QT)
# check qt 3rdparty path
--- /dev/null
+# JeMalloc
+
+if (NOT DEFINED INSTALL_JEMALLOC)
+ set (INSTALL_JEMALLOC OFF CACHE BOOL "${INSTALL_INSTALL_JEMALLOC_DESCR}")
+endif()
+
+# include occt macros. compiler_bitness, os_with_bit, compiler
+OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
+
+# specify JEMALLOC folder in connection with 3RDPARTY_DIR
+if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}")
+ if (NOT 3RDPARTY_JEMALLOC_DIR OR NOT EXISTS "${3RDPARTY_JEMALLOC_DIR}")
+ FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" jemalloc JEMALLOC_DIR_NAME)
+ if (JEMALLOC_DIR_NAME)
+ set (3RDPARTY_JEMALLOC_DIR "${3RDPARTY_DIR}/${JEMALLOC_DIR_NAME}" CACHE PATH "The directory containing JEMALLOC" FORCE)
+ set (3RDPARTY_JEMALLOC_DIR "${3RDPARTY_DIR}/${JEMALLOC_DIR_NAME}")
+ message(STATUS "Info: JEMALLOC detected in ${3RDPARTY_JEMALLOC_DIR}")
+ endif()
+ endif()
+ else()
+endif()
+
+# define required JEMALLOC variables
+if (NOT DEFINED 3RDPARTY_JEMALLOC_INCLUDE_DIR)
+ set (3RDPARTY_JEMALLOC_INCLUDE_DIR "" CACHE PATH "the path of headers directory")
+endif()
+
+# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR
+if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}")
+ CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_JEMALLOC_DIR 3RDPARTY_JEMALLOC_INCLUDE_DIR PATH "the path to JEMALLOC")
+ CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_JEMALLOC_DIR 3RDPARTY_JEMALLOC_LIBRARY_DIR FILEPATH "The directory containing JEMALLOC libraries")
+endif()
+
+# header
+if (NOT 3RDPARTY_JEMALLOC_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}")
+ set (HEADER_NAMES jemalloc.h)
+
+ # set 3RDPARTY_JEMALLOC_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_JEMALLOC_INCLUDE_DIR
+ set (3RDPARTY_JEMALLOC_INCLUDE_DIR "3RDPARTY_JEMALLOC_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to header directory" FORCE)
+
+ if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}")
+ find_path (3RDPARTY_JEMALLOC_INCLUDE_DIR NAMES ${HEADER_NAMES}
+ PATHS ${3RDPARTY_JEMALLOC_DIR}
+ PATH_SUFFIXES include/jemalloc
+ CMAKE_FIND_ROOT_PATH_BOTH
+ NO_DEFAULT_PATH)
+ endif()
+endif()
+
+if (3RDPARTY_JEMALLOC_INCLUDE_DIR AND EXISTS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}")
+ list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}")
+else()
+ list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_JEMALLOC_INCLUDE_DIR)
+ set (3RDPARTY_JEMALLOC_INCLUDE_DIR "" CACHE FILEPATH "the path to jemalloc.h" FORCE)
+endif()
+
+# Installing destination path
+if (WIN32)
+ set (JEMALLOC_INSTALL_DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}")
+else()
+ set (JEMALLOC_INSTALL_DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
+endif()
+
+macro (JEMALLOC_LIB_SEARCH MMGR_LIB PREFIX)
+if (NOT 3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB})
+ set (JEMALLOC_PATH_SUFFIXES "lib" "bin")
+ set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}-NOTFOUND")
+ if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}")
+ find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB}
+ PATHS "${3RDPARTY_JEMALLOC_LIBRARY_DIR}" "${3RDPARTY_JEMALLOC_DIR}"
+ PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES}
+ CMAKE_FIND_ROOT_PATH_BOTH
+ NO_DEFAULT_PATH)
+ else()
+ find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB}
+ PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES}
+ CMAKE_FIND_ROOT_PATH_BOTH)
+ endif()
+ if (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB})
+ get_filename_component (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}}" PATH)
+ set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}")
+ else()
+ set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "")
+ endif()
+endif()
+if (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB})
+ list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}")
+ set (3RDPARTY_JEMALLOC_LIBRARY_DIR "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}" CACHE PATH "The directory containing JEMALLOC libraries" FORCE)
+else()
+ message("Cannot find ${MMGR_LIB} library in jemalloc 3rdparty")
+ list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB})
+ set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "")
+endif()
+set (JEMALLOC_IS_STATIC_LIB FALSE)
+if (((${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} MATCHES "\.lib$")) OR ((${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} MATCHES "\.a$")))
+ get_filename_component(STATIC_LIB_NAME ${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} NAME)
+ list(APPEND CSF_MMGR "${STATIC_LIB_NAME}")
+ set (JEMALLOC_IS_STATIC_LIB TRUE)
+endif()
+# install instructions
+if (INSTALL_JEMALLOC AND NOT JEMALLOC_IS_STATIC_LIB)
+ OCCT_MAKE_OS_WITH_BITNESS()
+ OCCT_MAKE_COMPILER_SHORT_NAME()
+ get_filename_component(3RDPARTY_JEMALLOC_LIBRARY ${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} REALPATH)
+ if (SINGLE_GENERATOR)
+ install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
+ DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}")
+ else()
+ install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
+ CONFIGURATIONS Debug
+ DESTINATION "${JEMALLOC_INSTALL_DESTINATION}d")
+ install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
+ CONFIGURATIONS Release
+ DESTINATION "${JEMALLOC_INSTALL_DESTINATION}")
+ install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}"
+ CONFIGURATIONS RelWithDebInfo
+ DESTINATION "${JEMALLOC_INSTALL_DESTINATION}i")
+ endif()
+ set (USED_3RDPARTY_JEMALLOC_DIR "")
+elseif(NOT JEMALLOC_IS_STATIC_LIB)
+ # the library directory for using by the executable
+ set (USED_3RDPARTY_JEMALLOC_DIR ${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}})
+endif()
+unset(3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} CACHE)
+unset(3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} CACHE)
+endmacro()
+
+# Reset CSF variable
+set (CSF_MMGR "")
+
+# find static jemalloc lib
+SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a")
+if (WIN32)
+ JEMALLOC_LIB_SEARCH ("jemalloc" "STATIC")
+elseif(NOT WIN32)
+ JEMALLOC_LIB_SEARCH ("jemalloc_pic" "STATIC")
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES "" "so")
+ JEMALLOC_LIB_SEARCH ("jemalloc.so.2" "SHARED")
+endif()
+
+# find shared jemalloc lib
+SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".so")
+JEMALLOC_LIB_SEARCH ("jemalloc" "SHARED")
set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@"
set "FFMPEG_DIR=@3RDPARTY_FFMPEG_DLL_DIR@"
+ set "JEMALLOC_DIR=@3RDPARTY_JEMALLOC_LIBRARY_DIR@"
set "OPENVR_DIR=@3RDPARTY_OPENVR_DLL_DIRS@"
if not "@3RDPARTY_QT_DIR@" == "" (
export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@"
export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@"
export FFMPEG_DIR="@3RDPARTY_FFMPEG_LIBRARY_DIR@"
+ export JEMALLOC_DIR="@3RDPARTY_JEMALLOC_LIBRARY_DIR@"
if [ "x@3RDPARTY_QT_DIR" != "x" ]; then
export QTDIR="@3RDPARTY_QT_DIR@"
set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@"
set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@"
set "FFMPEG_DIR=@USED_3RDPARTY_FFMPEG_DIR@"
+ set "JEMALLOC_DIR=@USED_3RDPARTY_JEMALLOC_DIR@"
set "OPENVR_DIR=@USED_3RDPARTY_OPENVR_DIR@"
if not "@USED_3RDPARTY_QT_DIR@" == "" (
export TBB_DIR="@USED_3RDPARTY_TBB_DIR@"
export VTK_DIR="@USED_3RDPARTY_VTK_DIR@"
export FFMPEG_DIR="@USED_3RDPARTY_FFMPEG_DIR@"
+ export JEMALLOC_DIR="@USED_3RDPARTY_JEMALLOC_DIR@"
if [ "x@USED_3RDPARTY_QT_DIR@" != "x" ]; then
export QTDIR="@USED_3RDPARTY_QT_DIR@"
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
if not ["%FFMPEG_DIR%"] == [""] set "PATH=%FFMPEG_DIR%;%PATH%"
+if not ["%JEMALLOC_DIR%"] == [""] set "PATH=%JEMALLOC_DIR%;%PATH%"
if not ["%OPENVR_DIR%"] == [""] set "PATH=%OPENVR_DIR%;%PATH%"
rem ----- Set path to 3rd party and OCCT libraries -----
THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}"
fi
+if [ "$JEMALLOC_DIR" != "" ]; then
+ THRDPARTY_PATH="${JEMALLOC_DIR}:${THRDPARTY_PATH}"
+fi
+
if [ "$QTDIR" != "" ]; then
THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}"
fi
THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}"
fi
+if [ "$JEMALLOC_DIR" != "" ]; then
+ THRDPARTY_PATH="${JEMALLOC_DIR}:${THRDPARTY_PATH}"
+fi
+
if [ "$QTDIR" != "" ]; then
THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}"
fi
extern "C" int posix_memalign(void** thePtr, size_t theAlign, size_t theSize);
#endif
-// Temp define, after it will be part of CMake
-#define OCCT_MMGT_OPT_NATIVE
-
namespace
{
static Standard::AllocatorType& allocatorTypeInstance()
static Standard::AllocatorType aType =
#ifdef OCCT_MMGT_OPT_FLEXIBLE
Standard::AllocatorType::NATIVE;
-#elif defined OCCT_MMGT_OPT_NATIVE
- Standard::AllocatorType::NATIVE;
#elif defined OCCT_MMGT_OPT_TBB
Standard::AllocatorType::TBB;
#elif defined OCCT_MMGT_OPT_JEMALLOC
Standard::AllocatorType::JEMALLOC;
+#else
+ Standard::AllocatorType::NATIVE;
#endif
return aType;
}
#ifdef OCCT_MMGT_OPT_JEMALLOC
#define JEMALLOC_NO_DEMANGLE
-#include <jemalloc/jemalloc.h>
+#include <jemalloc.h>
#endif // OCCT_MMGT_OPT_JEMALLOC
-// Available macros definition
-// - OCCT_MMGT_OPT_FLEXIBLE, modifiable in real time
-// - OCCT_MMGT_OPT_TBB, using tbb::scalable_allocator
-// - OCCT_MMGT_OPT_NATIVE, using native calloc, free
-// - OCCT_MMGT_OPT_JEMALLOC, using external jecalloc, jefree
-#ifdef OCCT_MMGT_OPT_FLEXIBLE
-#include <Standard_MMgrOpt.hxx>
-#include <Standard_Assert.hxx>
-
- // paralleling with Intel TBB
+// paralleling with Intel TBB
#ifdef HAVE_TBB
-#pragma comment (lib, "tbbmalloc.lib")
#include <tbb/scalable_allocator.h>
#else
+#ifdef OCCT_MMGT_OPT_TBB
+#undef OCCT_MMGT_OPT_TBB
+#endif
#define scalable_malloc malloc
#define scalable_calloc calloc
#define scalable_realloc realloc
#define scalable_free free
#endif
+// Available macros definition
+// - OCCT_MMGT_OPT_FLEXIBLE, modifiable in real time
+// - OCCT_MMGT_OPT_TBB, using tbb::scalable_allocator
+// - OCCT_MMGT_OPT_NATIVE, using native calloc, free
+// - OCCT_MMGT_OPT_JEMALLOC, using external jecalloc, jefree
+#ifdef OCCT_MMGT_OPT_FLEXIBLE
+#include <Standard_MMgrOpt.hxx>
+#include <Standard_Assert.hxx>
+
// There is no support for environment variables in UWP
// OSD_Environment could not be used here because of cyclic dependency
#ifdef OCCT_UWP
Standard_Address Reallocate(Standard_Address thePtr,
const Standard_Size theSize) override
{
- Standard_Address newStorage = (Standard_Address)realloc(thePtr, theSize);
- if (!newStorage)
+ Standard_Address aNewStorage = (Standard_Address)realloc(thePtr, theSize);
+ if (!aNewStorage)
throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed");
// Note that it is not possible to ensure that additional memory
// allocated by realloc will be cleared (so as to satisfy myClear mode);
// in order to do that we would need using memset...
- return newStorage;
+ return aNewStorage;
}
//! Free allocated memory. The pointer is nullified.
Standard_Address Reallocate(Standard_Address thePtr,
const Standard_Size theSize) override
{
- Standard_Address newStorage = (Standard_Address)scalable_realloc(thePtr, theSize);
- if (!newStorage)
+ Standard_Address aNewStorage = (Standard_Address)scalable_realloc(thePtr, theSize);
+ if (!aNewStorage)
throw Standard_OutOfMemory("Standard_MMgrTBBalloc::Reallocate(): realloc failed");
// Note that it is not possible to ensure that additional memory
// allocated by realloc will be cleared (so as to satisfy myClear mode);
// in order to do that we would need using memset...
- return newStorage;
+ return aNewStorage;
}
//! Free allocated memory
{
#ifdef OCCT_MMGT_OPT_FLEXIBLE
return Standard_MMgrFactory::GetMMgr()->Allocate(theSize);
-#elif defined OCCT_MMGT_OPT_NATIVE
- Standard_Address aPtr = calloc(theSize, sizeof(char));
+#elif defined OCCT_MMGT_OPT_JEMALLOC
+ Standard_Address aPtr = je_calloc(theSize, sizeof(char));
if (!aPtr)
throw Standard_OutOfMemory("Standard_MMgrRaw::Allocate(): malloc failed");
return aPtr;
-#elif defined OCCT_MMGT_OPT_JEMALLOC
- Standard_Address aPtr = je_calloc(theSize, sizeof(char));
+#elif defined OCCT_MMGT_OPT_TBB
+ Standard_Address aPtr = scalable_calloc(theSize, sizeof(char));
+ if (!aPtr)
+ throw Standard_OutOfMemory("Standard_MMgrRaw::Allocate(): malloc failed");
+ return aPtr;
+#else
+ Standard_Address aPtr = calloc(theSize, sizeof(char));
if (!aPtr)
throw Standard_OutOfMemory("Standard_MMgrRaw::Allocate(): malloc failed");
return aPtr;
{
#ifdef OCCT_MMGT_OPT_FLEXIBLE
return Standard_MMgrFactory::GetMMgr()->Allocate(theSize);
-#elif defined OCCT_MMGT_OPT_NATIVE
- return malloc(theSize);
#elif defined OCCT_MMGT_OPT_JEMALLOC
return je_malloc(theSize);
+#elif defined OCCT_MMGT_OPT_TBB
+ return scalable_malloc(theSize);
+#else
+ return malloc(theSize);
#endif
}
{
#ifdef OCCT_MMGT_OPT_FLEXIBLE
Standard_MMgrFactory::GetMMgr()->Free(theStorage);
-#elif defined OCCT_MMGT_OPT_NATIVE
- free(theStorage);
#elif defined OCCT_MMGT_OPT_JEMALLOC
- return je_free(theStorage);
+ je_free(theStorage);
+#elif defined OCCT_MMGT_OPT_TBB
+ scalable_free(theStorage);
+#else
+ free(theStorage);
#endif
}
// in order to do that we would need using memset..
#ifdef OCCT_MMGT_OPT_FLEXIBLE
return Standard_MMgrFactory::GetMMgr()->Reallocate(theStorage, theSize);
-#elif defined OCCT_MMGT_OPT_NATIVE
- Standard_Address aNewStorage = (Standard_Address)realloc(theStorage, theSize);
+#elif defined OCCT_MMGT_OPT_JEMALLOC
+ Standard_Address aNewStorage = (Standard_Address)je_realloc(theStorage, theSize);
if (!aNewStorage)
throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed");
return aNewStorage;
-#elif defined OCCT_MMGT_OPT_JEMALLOC
- Standard_Address newStorage = (Standard_Address)je_realloc(theStorage, theSize);
- if (!newStorage)
+#elif defined OCCT_MMGT_OPT_TBB
+ Standard_Address aNewStorage = (Standard_Address)scalable_realloc(theStorage, theSize);
+ if (!aNewStorage)
throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed");
- return newStorage;
+ return aNewStorage;
+#else
+ Standard_Address aNewStorage = (Standard_Address)realloc(theStorage, theSize);
+ if (!aNewStorage)
+ throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed");
+ return aNewStorage;
#endif
}
Standard_Address Standard::AllocateAligned(const Standard_Size theSize,
const Standard_Size theAlign)
{
-#if defined(OCCT_MMGT_OPT_FLEXIBLE) || defined(OCCT_MMGT_OPT_NATIVE)
+#ifdef OCCT_MMGT_OPT_JEMALLOC
+ return je_aligned_alloc(theAlign, theSize);
+#elif defined OCCT_MMGT_OPT_TBB
+ return scalable_aligned_malloc(theSize, theAlign);
+#else
#if defined(_MSC_VER)
return _aligned_malloc(theSize, theAlign);
#elif defined(__ANDROID__) || defined(__QNX__)
}
return aPtr;
#endif
-#elif defined OCCT_MMGT_OPT_JEMALLOC
- return je_aligned_alloc(theAlign, theSize);
#endif
}
//=======================================================================
void Standard::FreeAligned(Standard_Address thePtrAligned)
{
-#if defined(OCCT_MMGT_OPT_FLEXIBLE) || defined(OCCT_MMGT_OPT_NATIVE)
+#ifdef OCCT_MMGT_OPT_JEMALLOC
+return je_free(thePtrAligned);
+#elif defined OCCT_MMGT_OPT_TBB
+ return scalable_aligned_free(thePtrAligned);
+#else
#if defined(_MSC_VER)
_aligned_free(thePtrAligned);
#elif defined(__ANDROID__) || defined(__QNX__)
#else
free(thePtrAligned);
#endif
-#elif defined OCCT_MMGT_OPT_JEMALLOC
- return je_free(thePtrAligned);
#endif
}
project(TKernel)
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit)
+
+# Set desired Memory Manager
+if ("${USE_MMGR_TYPE}" STREQUAL "FLEXIBLE")
+ target_compile_definitions("TKernel" PRIVATE "OCCT_MMGT_OPT_FLEXIBLE")
+elseif ("${USE_MMGR_TYPE}" STREQUAL "TBB")
+ target_compile_definitions("TKernel" PRIVATE "OCCT_MMGT_OPT_TBB")
+elseif ("${USE_MMGR_TYPE}" STREQUAL "JEMALLOC")
+ target_compile_definitions("TKernel" PRIVATE "OCCT_MMGT_OPT_JEMALLOC")
+else ()
+ message (STATUS "Info: Used native memory manager")
+endif()
CSF_wsock32
CSF_psapi
CSF_androidlog
+CSF_MMGR