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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.May 11 2020, 15:03
Herald added a reviewer: Restricted Project. · View Herald TranscriptMay 11 2020, 15:03
Fabien requested review of this revision.May 11 2020, 15:03
Fabien planned changes to this revision.May 11 2020, 15:03
Fabien updated this revision to Diff 19888.May 11 2020, 15:26

Link to all

Fabien retitled this revision from [WIP][CMAKE] Use jemalloc as an allocator to [CMAKE] Use jemalloc as an allocator.May 11 2020, 15:26
Fabien updated this revision to Diff 19889.May 11 2020, 15:28

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

Fabien edited the test plan for this revision. (Show Details)May 11 2020, 15:29
deadalnix added inline comments.
src/CMakeLists.txt
30 ↗(On Diff #19889)

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

Fabien updated this revision to Diff 19891.May 11 2020, 15:56

Put EXPERIMENTAL at the end.

Fabien edited the test plan for this revision. (Show Details)May 11 2020, 15:56
deadalnix accepted this revision.May 11 2020, 16:50
This revision is now accepted and ready to land.May 11 2020, 16:50
This revision was automatically updated to reflect the committed changes.