This is an automated email from the ASF dual-hosted git repository.
kou 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 1880d3ab08 GH-49042: [C++] Remove mimalloc patch (#49041)
1880d3ab08 is described below
commit 1880d3ab08e1e549142f9155dfbbdf1ff2b3a222
Author: Antoine Pitrou <[email protected]>
AuthorDate: Wed Jan 28 22:52:47 2026 +0100
GH-49042: [C++] Remove mimalloc patch (#49041)
### Rationale for this change
This patch was integrated upstream in
https://github.com/microsoft/mimalloc/pull/1139
### Are these changes tested?
By existing CI.
### Are there any user-facing changes?
No.
* GitHub Issue: #49042
Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
cpp/cmake_modules/ThirdpartyToolchain.cmake | 8 -------
cpp/cmake_modules/mimalloc-1138.patch | 33 -----------------------------
2 files changed, 41 deletions(-)
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index df937cc14c..fa8221b4a0 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -2343,13 +2343,6 @@ if(ARROW_MIMALLOC)
set(MIMALLOC_C_FLAGS "${MIMALLOC_C_FLAGS} -DERROR_COMMITMENT_MINIMUM=635")
endif()
- set(MIMALLOC_PATCH_COMMAND "")
- if(${UPPERCASE_BUILD_TYPE} STREQUAL "DEBUG")
- find_program(PATCH patch REQUIRED)
- set(MIMALLOC_PATCH_COMMAND ${PATCH} -p1 -i
- ${CMAKE_CURRENT_LIST_DIR}/mimalloc-1138.patch)
- endif()
-
set(MIMALLOC_CMAKE_ARGS
${EP_COMMON_CMAKE_ARGS}
"-DCMAKE_C_FLAGS=${MIMALLOC_C_FLAGS}"
@@ -2367,7 +2360,6 @@ if(ARROW_MIMALLOC)
${EP_COMMON_OPTIONS}
URL ${MIMALLOC_SOURCE_URL}
URL_HASH "SHA256=${ARROW_MIMALLOC_BUILD_SHA256_CHECKSUM}"
- PATCH_COMMAND ${MIMALLOC_PATCH_COMMAND}
CMAKE_ARGS ${MIMALLOC_CMAKE_ARGS}
BUILD_BYPRODUCTS "${MIMALLOC_STATIC_LIB}")
diff --git a/cpp/cmake_modules/mimalloc-1138.patch
b/cpp/cmake_modules/mimalloc-1138.patch
deleted file mode 100644
index 1ffa4bffbb..0000000000
--- a/cpp/cmake_modules/mimalloc-1138.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-Fix for https://github.com/microsoft/mimalloc/issues/1138
-
-diff --git a/src/arena.c b/src/arena.c
-index b26f4442..d7e99b55 100644
---- a/src/arena.c
-+++ b/src/arena.c
-@@ -797,6 +797,9 @@ mi_page_t* _mi_arenas_page_alloc(mi_heap_t* heap, size_t
block_size, size_t bloc
- else {
- page = mi_arenas_page_singleton_alloc(heap, block_size, block_alignment);
- }
-+ if mi_unlikely(page == NULL) {
-+ return NULL;
-+ }
- // mi_assert_internal(page == NULL || _mi_page_segment(page)->subproc ==
tld->subproc);
- mi_assert_internal(_mi_is_aligned(page, MI_PAGE_ALIGN));
- mi_assert_internal(_mi_ptr_page(page)==page);