Hi, In <2a32f61c-dd22-4f3f-bc98-822dcb6b0...@python.org> "Re: [Discuss][C++] Switch to mimalloc by default?" on Tue, 11 Jun 2024 10:21:12 +0200, Antoine Pitrou <anto...@python.org> wrote:
> I was thinking about find_package(). Good to know that it doesn't > affect the application, but would it affect Arrow C++ then? mimalloc doesn't override malloc()/free() as long as we don't include mimalloc-override.h: https://github.com/microsoft/mimalloc/blob/master/include/mimalloc-override.h So arrow::MimallocMemoryPool only uses mimalloc and other Arrow C++ codes don't use mimalloc. > There > might be a problem if a pointer is allocated by Arrow C++ (using the > mimalloc malloc()) and deallocated by the application (using the libc > free()). If the application mixes arrow::MemoryPool::Allocate()/Reallocate() and free(), it's happen. But it's an application bug. (The application must use arrow::MemoryPool::Free().) So we don't need to care about the case. Thanks, -- kou