Skip to content

Conversation

@adamreeve
Copy link
Contributor

@adamreeve adamreeve commented Jul 7, 2025

  • Enables building Arrow with mimalloc on all x64 platforms and Linux arm64
  • Enables building Arrow with jemalloc on Linux and x64 macOS

This means the default allocator will now be mimalloc, matching upstream Arrow on platforms where we enable it. Users can switch allocators with the ARROW_DEFAULT_MEMORY_POOL environment variable.

Mimalloc and jemalloc should work on arm64, but it appears that these don't build correctly when cross-compiling on an x64 host as part of the Arrow build. Arrow doesn't use mimalloc or jemalloc from vcpkg but always builds its own version, so this probably needs some fixes to the upstream Arrow build scripts.

var pool = MemoryPool.GetDefaultMemoryPool();

Assert.AreEqual(0, pool.BytesAllocated);
Assert.Greater(pool.MaxMemory, 0);
Copy link
Contributor Author

@adamreeve adamreeve Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was incorrect even with the system allocator and only passed when other tests had been run previously and allocated memory.

"name": "parquetsharp",
"version-string": "undefined",
"builtin-baseline": "d9ccd77bb554e67137f3f754a2e2f11f4188c82c",
"builtin-baseline": "e08b7bd89ae162f8579df2f8d39a1ae94107c8fd",
Copy link
Contributor Author

@adamreeve adamreeve Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to bump the baseline to pick up this fix that allows using mimalloc on non-Windows: microsoft/vcpkg#46299

@adamreeve adamreeve marked this pull request as ready for review July 7, 2025 09:19
@adamreeve adamreeve requested a review from jgiannuzzi July 7, 2025 09:19
@adamreeve adamreeve merged commit 064c6b7 into G-Research:master Jul 7, 2025
30 checks passed
@adamreeve adamreeve deleted the allocators branch July 7, 2025 09:51
@adamreeve adamreeve mentioned this pull request Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants