diff --git a/CMakeLists.txt b/CMakeLists.txt index f79dc5d43..e5f141f74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,7 +155,7 @@ endif() # Generic build options set(DEFAULT_MALLOC "system") if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") - set(DEFAULT_MALLOC "tcmalloc") + set(DEFAULT_MALLOC "mimalloc") endif() if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") @@ -179,7 +179,7 @@ endif() pika_option( PIKA_WITH_MALLOC STRING - "Define which allocator should be linked in. Options are: system, tcmalloc, jemalloc, mimalloc, tbbmalloc, and custom (default: tcmalloc)" + "Define which allocator should be linked in. Options are: system, tcmalloc, jemalloc, mimalloc, tbbmalloc, and custom (default: ${DEFAULT_MALLOC})" ${DEFAULT_MALLOC} STRINGS "system;tcmalloc;jemalloc;mimalloc;tbbmalloc;custom" ) diff --git a/cmake/pika_setup_allocator.cmake b/cmake/pika_setup_allocator.cmake index 5e358edc4..f7adb3b51 100644 --- a/cmake/pika_setup_allocator.cmake +++ b/cmake/pika_setup_allocator.cmake @@ -90,6 +90,10 @@ if(NOT TARGET pika_dependencies_allocator) ) endif() set(_use_custom_allocator TRUE) + + pika_warn( + "pika is using mimalloc as the allocator. Typically, exporting the following environment variables will further improve performance: MIMALLOC_EAGER_COMMIT_DELAY=0 and MIMALLOC_LARGE_OS_PAGES=1." + ) endif() # ##########################################################################