-
Notifications
You must be signed in to change notification settings - Fork 2
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
Heavily abstracted rewerite of the zerogc API for version 0.3 #34
Draft
Techcable
wants to merge
36
commits into
master
Choose a base branch
from
rewrite/zerogc-next-0.3-abstract
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is intended to be a replacement/redesign for zerogc
Simplifies size calculation. Use bumpalo for young-gen alloc
The oldgen collector is going to use a mimalloc heap for its internal allocations.
Some strange errors with invalid Layout alignment (when using miri)
These address calculations can't really be avoided :/ This reverts commit 2f0926f95db863829159608e82bf7c5f4c98adf2
Allows using AddressSanitizer
Triggers errors earlier in AddressSanitizer
Because FFI is forbidden
This causes the to pass miri (onlt with tree borrows, not stacked borrows)
This emulates bumpalo::Bump behavior and avoids a slow HashMap
Unfortunately, miri still reports leaks
This adds some extra overhead in young-gen, but not much in old
In the v0.3 API, the context crate will no longer exist and the simple crate needs to be rewritten.
The new version drops support for most features in v0.2
Will not be used with initial version of v0.3 API
Will be handled differently in v0.3 API
Doesn't delete any code right now
Reduces some features for derive macros (specifically warnings), but is not really needed for the main crate.
Very unsafe
Remove unused dependencies.
Only offered with special extension trait `MutableKeys`. Drop unused `deserialize` option for macro (GcDeserialize removed). Drop unused dependencies.
The GcHeader api allows access to an object's internal header, which contains the CollectorId. For an array, the header also contains the length. Implmentations can (and will) add extra metadata to their header like mark bits and type info. Make methods on Gc associated functions instead of methods in order to avoid conflicts with the Deref trait. This is what Arc and Box both do.
Techcable
changed the title
[DEAD] Heavily abstracted rewerite of the zerogc API for version 0.3
Heavily abstracted rewerite of the zerogc API for version 0.3
Jun 30, 2024
Currently doesn't compile
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I fell victim to one of the most classic programming blunders, wasting time with excessive abstraction.
Unfortunately, I don't think abstracting over multiple GC implementations is very necessary right now. It's a waste of time when I'm only planning on a single implementation.
It is true that language virtual machines are likely to have their own garbage collection implementations. However, there are better abstractions for that like mmtk.
A future version may add back in some of this abstraction, but for now the concrete implementation I have prototyped in Techcable/zerogc-next0.3 will work fine with some improvements.