mirror of https://github.com/milvus-io/milvus.git
enhance: jemalloc aarch64 platform use 64k pagesize. (#29522)
enhance: jemalloc aarch64 platform use 64k pagesize. issue: #28843 Signed-off-by: Yusheng.Ma <Yusheng.Ma@zilliz.com>pull/30998/head
parent
c411cb4a49
commit
19c64067af
|
@ -27,6 +27,13 @@ message(STATUS "Building (vendored) jemalloc from source")
|
||||||
# installations.
|
# installations.
|
||||||
# find_package(jemalloc)
|
# find_package(jemalloc)
|
||||||
|
|
||||||
|
include(CheckSymbolExists)
|
||||||
|
|
||||||
|
macro(detect_aarch64_target_arch)
|
||||||
|
check_symbol_exists(__aarch64__ "" __AARCH64)
|
||||||
|
endmacro()
|
||||||
|
detect_aarch64_target_arch()
|
||||||
|
|
||||||
set(JEMALLOC_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
set(JEMALLOC_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||||
set(JEMALLOC_LIB_DIR "${JEMALLOC_PREFIX}/lib")
|
set(JEMALLOC_LIB_DIR "${JEMALLOC_PREFIX}/lib")
|
||||||
set(JEMALLOC_STATIC_LIB "${JEMALLOC_LIB_DIR}/libjemalloc_pic${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
set(JEMALLOC_STATIC_LIB "${JEMALLOC_LIB_DIR}/libjemalloc_pic${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||||
|
@ -37,10 +44,9 @@ if (CMAKE_OSX_SYSROOT)
|
||||||
list(APPEND JEMALLOC_CONFIGURE_COMMAND "SDKROOT=${CMAKE_OSX_SYSROOT}")
|
list(APPEND JEMALLOC_CONFIGURE_COMMAND "SDKROOT=${CMAKE_OSX_SYSROOT}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (DEFINED MILVUS_JEMALLOC_LG_PAGE)
|
if (DEFINED __AARCH64)
|
||||||
# Used for arm64 manylinux wheels in order to make the wheel work on both
|
#aarch64 platform use 64k pagesize.
|
||||||
# 4k and 64k page arm64 systems.
|
list(APPEND JEMALLOC_CONFIGURE_COMMAND "--with-lg-page=16")
|
||||||
list(APPEND JEMALLOC_CONFIGURE_COMMAND "--with-lg-page=${MILVUS_JEMALLOC_LG_PAGE}")
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
list(APPEND
|
list(APPEND
|
||||||
|
|
Loading…
Reference in New Issue