Page MenuHomePhabricator

[CMAKE] Use jemalloc as an allocator
ClosedPublic

Authored by Fabien on May 11 2020, 15:03.

Details

Summary

This adds an option to use the jemalloc library to provide the memory
allocation functions, which improves the performances (got a >40% gain
on ninja check duration).
For now the library is disabled by default, no version is enforced and
no documentation provided. This will be added later, after the library
gets added to the depends so it will build on all platforms.

Test Plan
cmake -GNinja .. -DUSE_JEMALLOC_EXPERIMENTAL=ON
ninja all check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cmake_jemalloc
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 10686
Build 19169: Default Diff Build & Tests
Build 19168: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.May 11 2020, 15:03
Fabien planned changes to this revision.May 11 2020, 15:03
Fabien retitled this revision from [WIP][CMAKE] Use jemalloc as an allocator to [CMAKE] Use jemalloc as an allocator.May 11 2020, 15:26

State as experimental, so the cache won't let it off when we enable it by default.

deadalnix added inline comments.
src/CMakeLists.txt
30 ↗(On Diff #19889)

I'd put experimental at the end rather than the start.

Put EXPERIMENTAL at the end.

This revision is now accepted and ready to land.May 11 2020, 16:50