Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-44342: [C++] Disable jemalloc by default on ARM #44380

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ci/scripts/python_wheel_manylinux_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ==="
: ${ARROW_GANDIVA:=OFF}
: ${ARROW_GCS:=ON}
: ${ARROW_HDFS:=ON}
: ${ARROW_JEMALLOC:=ON}
: ${ARROW_MIMALLOC:=ON}
: ${ARROW_ORC:=ON}
: ${ARROW_PARQUET:=ON}
Expand All @@ -81,6 +80,9 @@ if [[ "$(uname -m)" == arm* ]] || [[ "$(uname -m)" == aarch* ]]; then
# 4k and 64k page arm64 systems. For more context see
# https://github.com/apache/arrow/issues/10929
export ARROW_EXTRA_CMAKE_FLAGS="-DARROW_JEMALLOC_LG_PAGE=16"
: ${ARROW_JEMALLOC:=OFF}
else
: ${ARROW_JEMALLOC:=ON}
fi

mkdir /tmp/arrow-build
Expand Down
6 changes: 5 additions & 1 deletion cpp/cmake_modules/DefineOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,18 @@ takes precedence over ccache if a storage backend is configured" ON)

set(ARROW_JEMALLOC_DESCRIPTION "Build the Arrow jemalloc-based allocator")
if(WIN32
OR "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD"
OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD"
OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch|ARM|arm"
OR NOT ARROW_ENABLE_THREADING)
# jemalloc is not supported on Windows.
#
# jemalloc is the default malloc implementation on FreeBSD and can't
# be built with --disable-libdl on FreeBSD. Because lazy-lock feature
# is required on FreeBSD. Lazy-lock feature requires libdl.
#
# jemalloc may have a problem on ARM.
# See also: https://github.com/apache/arrow/issues/44342
#
# jemalloc requires thread.
define_option(ARROW_JEMALLOC ${ARROW_JEMALLOC_DESCRIPTION} OFF)
else()
Expand Down
3 changes: 2 additions & 1 deletion python/pyarrow/tests/test_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import contextlib
import os
import platform
import signal
import subprocess
import sys
Expand All @@ -30,7 +31,7 @@

possible_backends = ["system", "jemalloc", "mimalloc"]

should_have_jemalloc = sys.platform == "linux"
should_have_jemalloc = (sys.platform == "linux" and platform.machine() == 'x86_64')
should_have_mimalloc = sys.platform == "win32"


Expand Down
Loading