Skip to content
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

Add read helpers #5

Merged
merged 17 commits into from
Nov 6, 2023
Merged

Add read helpers #5

merged 17 commits into from
Nov 6, 2023

Conversation

fu5ha
Copy link
Member

@fu5ha fu5ha commented Oct 18, 2022

Motivated by Traverse-Research/gpu-allocator#139, scaffolded some read-helper functions.

These helpers are mostly all unsafe and have both semi-checked and completely unchecked variants. They are relevant in either case because they lay out in documentation exactly what the needed safety requirements are to read the given data, given that we have a properly implemented Slab, and try to remove some common footguns (alignment, size within allocation) where possible in the checked variants.

A note for reviewers is that you can skip the copy.rs file as that is just code movement from the old lib.rs.

@eddyb, requested your review since you helped validate presser originally and you might have some valuable input on the safety comments/requirements here.

@fu5ha fu5ha added the enhancement New feature or request label Oct 18, 2022
@fu5ha fu5ha requested a review from eddyb October 18, 2022 19:48
@fu5ha fu5ha added the block-automerge Stops mergify from auto-merging the PR label Oct 18, 2022
src/copy.rs Show resolved Hide resolved
src/copy.rs Outdated Show resolved Hide resolved
src/copy.rs Outdated Show resolved Hide resolved
src/copy.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
@fu5ha
Copy link
Member Author

fu5ha commented Nov 1, 2022

Thanks for the review @MarijnS95 , though, FWIW all your comments are in the copy module which is entirely unchanged in this PR 😅 haha. It's just code movement. The read module is the new stuff.

@fu5ha fu5ha merged commit eccc08c into main Nov 6, 2023
9 checks passed
@mergify mergify bot deleted the read branch November 6, 2023 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block-automerge Stops mergify from auto-merging the PR enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants