This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 0826be572b GH-45978: [C++] Bump bundled mimalloc version (#45979)
0826be572b is described below

commit 0826be572bd9ceeecb8c00695eb63b2f6135133f
Author: Antoine Pitrou <[email protected]>
AuthorDate: Thu Jun 12 09:59:53 2025 +0200

    GH-45978: [C++] Bump bundled mimalloc version (#45979)
    
    ### What changes are included in this PR?
    
    Update bundled mimalloc version from 2.0.6 to 2.2.4. This will also help 
fix the CMake 4.0 compatibility issues.
    
    ### Are these changes tested?
    
    Yes, by CI builds.
    
    ### Are there any user-facing changes?
    
    No.
    
    * GitHub Issue: #45978
    
    Authored-by: Antoine Pitrou <[email protected]>
    Signed-off-by: Antoine Pitrou <[email protected]>
---
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 14 +++++++++-----
 cpp/thirdparty/versions.txt                 |  4 ++--
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 29dde40716..193711a6fb 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -2275,21 +2275,25 @@ if(ARROW_MIMALLOC)
   # We only use a vendored mimalloc as we want to control its build options.
 
   set(MIMALLOC_LIB_BASE_NAME "mimalloc")
-  if(WIN32)
-    set(MIMALLOC_LIB_BASE_NAME "${MIMALLOC_LIB_BASE_NAME}-static")
-  endif()
   if(${UPPERCASE_BUILD_TYPE} STREQUAL "DEBUG")
     set(MIMALLOC_LIB_BASE_NAME 
"${MIMALLOC_LIB_BASE_NAME}-${LOWERCASE_BUILD_TYPE}")
   endif()
 
   set(MIMALLOC_PREFIX 
"${CMAKE_CURRENT_BINARY_DIR}/mimalloc_ep/src/mimalloc_ep")
-  set(MIMALLOC_INCLUDE_DIR "${MIMALLOC_PREFIX}/include/mimalloc-2.0")
+  set(MIMALLOC_INCLUDE_DIR "${MIMALLOC_PREFIX}/include/mimalloc-2.2")
   set(MIMALLOC_STATIC_LIB
-      
"${MIMALLOC_PREFIX}/lib/mimalloc-2.0/${CMAKE_STATIC_LIBRARY_PREFIX}${MIMALLOC_LIB_BASE_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
+      
"${MIMALLOC_PREFIX}/lib/mimalloc-2.2/${CMAKE_STATIC_LIBRARY_PREFIX}${MIMALLOC_LIB_BASE_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
   )
 
+  set(MIMALLOC_C_FLAGS ${EP_C_FLAGS})
+  if(MINGW)
+    # Workaround https://github.com/microsoft/mimalloc/issues/910 on RTools40
+    set(MIMALLOC_C_FLAGS "${MIMALLOC_C_FLAGS} -DERROR_COMMITMENT_MINIMUM=635")
+  endif()
+
   set(MIMALLOC_CMAKE_ARGS
       ${EP_COMMON_CMAKE_ARGS}
+      "-DCMAKE_C_FLAGS=${MIMALLOC_C_FLAGS}"
       "-DCMAKE_INSTALL_PREFIX=${MIMALLOC_PREFIX}"
       -DMI_OVERRIDE=OFF
       -DMI_LOCAL_DYNAMIC_TLS=ON
diff --git a/cpp/thirdparty/versions.txt b/cpp/thirdparty/versions.txt
index 3a8ad73e13..1fc53c4d5e 100644
--- a/cpp/thirdparty/versions.txt
+++ b/cpp/thirdparty/versions.txt
@@ -82,8 +82,8 @@ ARROW_JEMALLOC_BUILD_VERSION=5.3.0
 
ARROW_JEMALLOC_BUILD_SHA256_CHECKSUM=2db82d1e7119df3e71b7640219b6dfe84789bc0537983c3b7ac4f7189aecfeaa
 ARROW_LZ4_BUILD_VERSION=v1.10.0
 
ARROW_LZ4_BUILD_SHA256_CHECKSUM=537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b
-ARROW_MIMALLOC_BUILD_VERSION=v2.0.6
-ARROW_MIMALLOC_BUILD_SHA256_CHECKSUM=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+ARROW_MIMALLOC_BUILD_VERSION=v2.2.4
+ARROW_MIMALLOC_BUILD_SHA256_CHECKSUM=754a98de5e2912fddbeaf24830f982b4540992f1bab4a0a8796ee118e0752bda
 ARROW_NLOHMANN_JSON_BUILD_VERSION=v3.12.0
 
ARROW_NLOHMANN_JSON_BUILD_SHA256_CHECKSUM=4b92eb0c06d10683f7447ce9406cb97cd4b453be18d7279320f7b2f025c10187
 ARROW_OPENTELEMETRY_BUILD_VERSION=v1.21.0

Reply via email to