Hi, > I'm not sure there's much maintenance cost.
It's not high maintenance cost but it's sometimes broken. For example: https://github.com/apache/arrow/issues/39517 > I expect some people might > prefer jemalloc, and perhaps it performs better on some use cases. So > for now I would recommend keeping it. OK. If there are users who prefer jemalloc, let's keep jemalloc support. >> 2. Is it OK that we add support for system mimalloc? > > Hmm... that sounds legitimate, but with the caveat that a system > mimalloc can override the standard malloc/free functions. Would that > affect an application using Arrow C++? Are you saying the LD_PRELOAD approach not the find_package(mimalloc) approach? If so, it affects an application using Arrow C++. If we use the find_package(mimalloc) approach, it doesn't affect an application using Arrow C++. >> FYI: In general, I want to use system libraries as much as >> possible. But we can't use system jemalloc for bindings >> because most system jemalloc don't support dlopen(): >> https://github.com/apache/arrow/issues/32530 > > We use something similar for mimalloc: > https://github.com/apache/arrow/blob/036fca0ae5c8956c83b69478d413c24f32398f8c/cpp/cmake_modules/ThirdpartyToolchain.cmake#L2223 Oh... Anyway, I tried system mimalloc: https://github.com/apache/arrow/pull/42090 Debian's mimalloc doesn't use -DMI_LOCAL_DYNAMIC_TLS=ON but there is no dlopen() related error. https://salsa.debian.org/debian/mimalloc/-/blob/master/debian/rules?ref_type=heads#L21 So I prefer mimalloc to jemalloc. Thanks, -- kou In <eb0c3ef5-5c9f-4317-89fb-9051a7ea4...@python.org> "Re: [Discuss][C++] Switch to mimalloc by default?" on Mon, 10 Jun 2024 17:08:58 +0200, Antoine Pitrou <anto...@python.org> wrote: > > Hi Kou, > > Le 09/06/2024 à 09:16, Sutou Kouhei a écrit : >> Questions: >> 1. Do we need to keep jemalloc support? Compatibility? Can we >> drop support for jemalloc to decrease maintenance cost? > > I'm not sure there's much maintenance cost. I expect some people might > prefer jemalloc, and perhaps it performs better on some use cases. So > for now I would recommend keeping it. > >> 2. Is it OK that we add support for system mimalloc? > > Hmm... that sounds legitimate, but with the caveat that a system > mimalloc can override the standard malloc/free functions. Would that > affect an application using Arrow C++? > >> FYI: In general, I want to use system libraries as much as >> possible. But we can't use system jemalloc for bindings >> because most system jemalloc don't support dlopen(): >> https://github.com/apache/arrow/issues/32530 > > We use something similar for mimalloc: > https://github.com/apache/arrow/blob/036fca0ae5c8956c83b69478d413c24f32398f8c/cpp/cmake_modules/ThirdpartyToolchain.cmake#L2223 > > Regards > > Antoine.