apache / apache/arrow

[C++] Add support for system mimalloc

Open
#42,211 1 comment 4 reactions 0 assignees View on GitHub
Component: C++ Status: needs champion Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

We always use bundled mimalloc for now. If we can use system mimalloc, we can reduce build time and improve security. (If mimalloc has a security vulnerability, we can fix it by updating only system mimalloc.)

mimalloc provides `malloc()`/`free()` by default. If system mimalloc is built without `MI_OVERRIDE=OFF`, `malloc()`/`free()` calls will use mimalloc's `malloc()`/`free()` instead of system `malloc()`/`free()`. (We want to use mimalloc only in `arrow::MemoryPool`.)
https://github.com/microsoft/mimalloc/blob/03020fbf81541651e24289d2f7033a772a50f480/CMakeLists.txt#L10

It may be difficult to solve.

See also the system mimalloc discussion in the "[Discuss][C++] Switch to mimalloc by default?" discussion: https://lists.apache.org/thread/dts9ggvkthczfpmd25wrz449mxod76o2

### Component(s)

C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.