-
-
Notifications
You must be signed in to change notification settings - Fork 74
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: cleanup runtime/memory code #142
Conversation
Codecov Report
@@ Coverage Diff @@
## master #142 +/- ##
==========================================
- Coverage 82.06% 81.98% -0.09%
==========================================
Files 160 160
Lines 10806 10816 +10
==========================================
- Hits 8868 8867 -1
- Misses 1938 1949 +11
Continue to review full report at Codecov.
|
Looks nice, one questions: Would it be possible to add unsafe |
@baszalmstra Yes, as I mentioned in the first discussion topic of PR #140, we can add non-guaranteed (or unsafe) casts, but when those fail they would result in zeroed memory. Would you be happy with that? If so, I'll create a new PR for that specific case. |
If a warning is emitted for that as well, that would be totally fine by me! :) |
The MemoryMapper trait now receives a pre-calculated mapping, reducing the implementation size for anyone implementing the trait.
Garbage collection uses TypeInfo pointers that cannot directly be linked to the lifetime of their assemblies. As a result any usage of these pointers is unsafe. To clarify this, the RawTypeInfo type has been renamed to UnsafeTypeInfo and everywhere it is used, unsafe must be added, similar to Rust's UnsafeCell type.
1e15f48
to
5be9d5c
Compare
Depends on #140.