raulcd commented on code in PR #50549:
URL: https://github.com/apache/arrow/pull/50549#discussion_r3614894803


##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -2567,8 +2567,15 @@ if(ARROW_MIMALLOC)
       "-DCMAKE_C_FLAGS=${MIMALLOC_C_FLAGS}"
       "-DCMAKE_INSTALL_PREFIX=${MIMALLOC_PREFIX}"
       -DMI_INSTALL_TOPLEVEL=ON
+      # Don't override default malloc
       -DMI_OVERRIDE=OFF
+      -DMI_OSX_INTERPOSE=OFF
+      -DMI_OSX_ZONE=OFF
+      # Allow usage through dlopen (i.e. when libarrow.so itself is dlopen'ed)
       -DMI_LOCAL_DYNAMIC_TLS=ON
+      # GH-50428: Make sure several mimalloc instances can cohabit in the same 
process
+      # (also 
https://github.com/microsoft/mimalloc/issues/1327#issuecomment-4964140817)
+      -DMI_TLS_MODEL_THREAD_LOCAL=ON

Review Comment:
   On the built wheel logs I can see that `MI_TLS_MODEL_THREAD_LOCAL` don't 
seem to be used:
   ```
    CMake Warning:
     Manually-specified variables were not used by the project:
   
       BUILD_STATIC_LIBS
       BUILD_TESTING
       CMAKE_CXX_COMPILER
       CMAKE_CXX_FLAGS
       CMAKE_CXX_FLAGS_DEBUG
       CMAKE_CXX_FLAGS_MISIZEREL
       CMAKE_CXX_FLAGS_RELEASE
       CMAKE_CXX_FLAGS_RELWITHDEBINFO
       CMAKE_C_FLAGS_MISIZEREL
       CMAKE_POLICY_VERSION_MINIMUM
       MI_TLS_MODEL_THREAD_LOCAL
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to