-
Notifications
You must be signed in to change notification settings - Fork 111
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 iter_allocated_chunks_raw()
#127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this looks good.
Can you add some smoke tests for iteration as well? Maybe a quickcheck that allocates a bunch of things, records the ranges where the things are allocated, and then makes sure that every allocated thing is within one of the chunks as returned by iter_allocated_chunks_raw
? See tests/quickchecks.rs
for the other quickchecks, which should give you an idea of how to write this kind of test.
Thanks!
Added smoke tests. No unit tests, but hopefully the existing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look great!
Couple nitpicks below and then this should be ready to merge.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks @fitzgen! If it's not too much trouble, we'd really appreciate if you could release a new version with the changes, please? :) (no hurry if you have other pending changes, just whenever is convenient) |
Published! |
Great, thanks a lot! |
Adds
iter_allocated_chunks_raw()
, which (a) yields raw(*mut u8, usize)
, and (b) only borrows the arena immutably.Fixes #121, follow-up from PR #126 (posting a new one as all of the previous changes would be reverted)
I need to finish the docs and add tests, posting just to get confirmation on this approach first.
Thanks!