phobos
phobos copied to clipboard
Add GCHeapMallocator
In preparation for the removal of GCAllocator.deallocate and GCAllocator.reallocate, make that functionality available via a new allocator with a different name.
Users of GCAllocator that wish to continue using manual @system memory
management instead of automatic @safe memory management can switch to
GCHeapMallocator.
For the rationale behind these changes, see PR #8554 and issue 23318.
CC @CyberShadow @schveiguy
@atilaneves this adds a new symbol
Thanks for your pull request and interest in making D better, @pbackus! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Please verify that your PR follows this checklist:
- My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
- My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
- I have provided a detailed rationale explaining my changes
- New or modified functions have Ddoc comments (with
Params:andReturns:)
Please see CONTRIBUTING.md for more information.
If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.
Bugzilla references
| Auto-close | Bugzilla | Severity | Description |
|---|---|---|---|
| ✗ | 23318 | enhancement | GCAllocator should not implement deallocate |
Testing this PR locally
If you don't have a local development environment setup, you can use Digger to test this PR:
dub run digger -- build "master + phobos#8555"
core.exception.AssertError@std/logger/core.d(1905): foo
Looks like a flaky test. Force pushing to retry...
https://github.com/dlang/phobos/pull/8557
Rebased to pick up #8557
Can this be an alias/wrapper underneath? Hard to review this when most likely it's simply a copy-paste of existing code.
@schveiguy Made it a wrapper.
Please see my comments on the other PR.