-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor libarena #67304
Refactor libarena #67304
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
This seems to a lot more complex with new traits and macros though. The code is already split into the 2 code paths we care about (types with destructors and types without destructors).
I think you should split out the tests to a separate PR. |
☔ The latest upstream changes (presumably #67540) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage: |
|
Starting from some optimisation in libarena, I got a bit carried away.
This PR splits the logic into 4 basic allocation policies, depending on whether the allocated type is a ZST or needs dropping. I think splitting everything allows for more local reasoning, which is good for such tricky code.
A few tests have been added and bugs removed.
I am still unhappy with the tests for
alloc_from_iter
methods.r? @Zoxc