Skip to content

Link jemalloc pool and test with libc explicitly to avoid recursive calls to jemalloc (tmp fix) #139

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

Merged
merged 1 commit into from
Jan 19, 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 src/pool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ endif()
# libumf_pool_jemalloc
if(UMF_BUILD_LIBUMF_POOL_JEMALLOC)
if(LINUX)
# TODO: we link directly with libc to force using malloc from glibc
# This is a temporary fix for https://github.com/oneapi-src/unified-memory-framework/issues/161
add_umf_library(NAME jemalloc_pool
TYPE STATIC
SRCS pool_jemalloc.c
LIBS jemalloc umf_utils)
LIBS c jemalloc umf_utils)
add_library(${PROJECT_NAME}::jemalloc_pool ALIAS jemalloc_pool)
install(TARGETS jemalloc_pool
EXPORT ${PROJECT_NAME}-targets
Expand Down
4 changes: 3 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ endif()

if(UMF_BUILD_OS_MEMORY_PROVIDER)
if(UMF_BUILD_LIBUMF_POOL_JEMALLOC)
# TODO: we link directly with libc to force using malloc from glibc
# This is a temporary fix for https://github.com/oneapi-src/unified-memory-framework/issues/161
add_umf_test(NAME jemalloc_pool
SRCS pools/jemalloc_pool.cpp malloc_compliance_tests.cpp
LIBS jemalloc_pool)
LIBS c jemalloc_pool)
endif()
else()
message(STATUS "The jemalloc_pool test is DISABLED, because it uses OS_MEMORY_PROVIDER, while the UMF_BUILD_OS_MEMORY_PROVIDER option is set to OFF")
Expand Down