File tree 5 files changed +25
-27
lines changed
5 files changed +25
-27
lines changed Original file line number Diff line number Diff line change @@ -1408,16 +1408,20 @@ if(ARROW_JEMALLOC)
1408
1408
"${JEMALLOC_PREFIX} /lib/libjemalloc_pic${CMAKE_STATIC_LIBRARY_SUFFIX} " )
1409
1409
externalproject_add(
1410
1410
jemalloc_ep
1411
- URL ${CMAKE_CURRENT_SOURCE_DIR} /thirdparty/jemalloc/ ${JEMALLOC_VERSION} .tar.gz
1411
+ URL ${JEMALLOC_SOURCE_URL}
1412
1412
PATCH_COMMAND touch doc /jemalloc.3 doc /jemalloc.html
1413
- CONFIGURE_COMMAND ./autogen.sh
1413
+ # The prefix "je_arrow_" must be kept in sync with the value in memory_pool.cc
1414
+ CONFIGURE_COMMAND ./configure
1414
1415
"AR=${CMAKE_AR} "
1415
1416
"CC=${CMAKE_C_COMPILER} "
1416
1417
"--prefix=${JEMALLOC_PREFIX} "
1417
1418
"--with-jemalloc-prefix=je_arrow_"
1418
1419
"--with-private-namespace=je_arrow_private_"
1419
- "--disable-tls"
1420
- ${EP_LOG_OPTIONS}
1420
+ "--without-export"
1421
+ # Don't override operator new()
1422
+ "--disable-cxx" "--disable-libdl"
1423
+ # See https://github.com/jemalloc/jemalloc/issues/1237
1424
+ "--disable-initial-exec-tls" ${EP_LOG_OPTIONS}
1421
1425
BUILD_IN_SOURCE 1
1422
1426
BUILD_COMMAND ${MAKE} ${MAKE_BUILD_ARGS}
1423
1427
BUILD_BYPRODUCTS "${JEMALLOC_STATIC_LIB} "
Original file line number Diff line number Diff line change 38
38
#include < mimalloc.h>
39
39
#endif
40
40
41
+ #ifdef ARROW_JEMALLOC
42
+
43
+ // Compile-time configuration for jemalloc options.
44
+ // Note the prefix ("je_arrow_") must match the symbol prefix given when
45
+ // building jemalloc.
46
+ // See discussion in https://github.com/jemalloc/jemalloc/issues/1621
47
+
48
+ #ifdef NDEBUG
49
+ const char * je_arrow_malloc_conf = " oversize_threshold:0" ;
50
+ #else
51
+ // In debug mode, add memory poisoning on alloc / free
52
+ const char * je_arrow_malloc_conf = " oversize_threshold:0,junk:true" ;
53
+ #endif
54
+ #endif
55
+
41
56
namespace arrow {
42
57
43
58
constexpr size_t kAlignment = 64 ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ GFLAGS_VERSION=v2.2.0
35
35
GLOG_VERSION=v0.3.5
36
36
GRPC_VERSION=v1.20.0
37
37
GTEST_VERSION=1.8.1
38
- JEMALLOC_VERSION=17c897976c60b0e6e4f4a365c751027244dada7a
38
+ JEMALLOC_VERSION=5.2.1
39
39
LZ4_VERSION=v1.8.3
40
40
# Need post-v1.0.6 version for https://github.com/microsoft/mimalloc/pull/140,
41
41
# https://github.com/microsoft/mimalloc/pull/145 and
@@ -72,6 +72,7 @@ DEPENDENCIES=(
72
72
" ARROW_GLOG_URL glog-${GLOG_VERSION} .tar.gz https://github.com/google/glog/archive/${GLOG_VERSION} .tar.gz"
73
73
" ARROW_GRPC_URL grpc-${GRPC_VERSION} .tar.gz https://github.com/grpc/grpc/archive/${GRPC_VERSION} .tar.gz"
74
74
" ARROW_GTEST_URL gtest-${GTEST_VERSION} .tar.gz https://github.com/google/googletest/archive/release-${GTEST_VERSION} .tar.gz"
75
+ " ARROW_JEMALLOC_URL jemalloc-${JEMALLOC_VERSION} .tar.bz2 https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION} /jemalloc-${JEMALLOC_VERSION} .tar.bz2"
75
76
" ARROW_LZ4_URL lz4-${LZ4_VERSION} .tar.gz https://github.com/lz4/lz4/archive/${LZ4_VERSION} .tar.gz"
76
77
" ARROW_MIMALLOC_URL mimalloc-${MIMALLOC_VERSION} .tar.gz https://github.com/microsoft/mimalloc/archive/${MIMALLOC_VERSION} .tar.gz"
77
78
" ARROW_ORC_URL orc-${ORC_VERSION} .tar.gz https://github.com/apache/orc/archive/rel/release-${ORC_VERSION} .tar.gz"
You can’t perform that action at this time.
0 commit comments