Add features for alternate global allocators#1411
Add features for alternate global allocators#1411frc4533-lincoln wants to merge 1 commit intomemorysafety:mainfrom
Conversation
|
|
||
| option('malloc', | ||
| type: 'combo', | ||
| choices: ['default', 'mimalloc', 'mimalloc_secure', 'jemalloc'], |
There was a problem hiding this comment.
Are you able to integrate this into dav1d's meson build system, too, so we can more accurately compare them? How difficult is that?
There was a problem hiding this comment.
I'm using Rust crates for mimalloc and jemalloc so I'd need to figure out how to link them.
I guess I can try
There was a problem hiding this comment.
If it's difficult, we can merge this in as is—it's still useful—but it'd be even nicer to be able to compare to dav1d with the same allocator.
There was a problem hiding this comment.
@frc4533-lincoln, is it difficult? Should we just merge this in as is and add it to dav1d later?
There was a problem hiding this comment.
@frc4533-lincoln, I can merge this, but I don't have permission to git push --force after rebasing.
|
Given that the global allocator is usually decided by the application, and not a library, not sure if this should be eligible for the performance bounty -- this doesn't directly contribute to rav1d performance relative to dav1d. Though it will still be interesting to see what the performance difference will be like! |
|
@djc Yeah, that's fine. |
Just to let you know, we did discuss this separately beforehand and I clarified that changing the allocator wouldn't be eligible for the performance bounty, but that it could still be useful as a way to potentially uncover memory-related performance bottlenecks. |
This PR adds features for switching the global allocator to mimalloc, mimalloc secure mode, or jemalloc.
As for why these two:
PartitionAlloc (used in Chrome) doesn't have Rust bindings, but I could write some if that'd be useful.