-
Notifications
You must be signed in to change notification settings - Fork 26
Add low-level HashTable API
#78
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
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| /// A low-level hash table interface. | ||
| pub mod table { | ||
| pub use crate::raw::table::{HashTable, InsertResult, IntoIter, Iter, IterMut}; |
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.
This is missing Dealloc, which makes it impossible to use HashTable
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.
Seems Operation and MapGuard are missing too
| Tagged { | ||
| raw: self, | ||
| ptr: self.map_addr(|addr| addr & T::MASK), | ||
| ptr: self.map_addr(|addr| addr & Entry::MASK), |
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.
I think the code before was bugged, but happened to work because when boxed it's always 8 bytes aligned. ptr is not supposed to be tagged. I didn't have pointers that were 8 byte aligned and changing this to be raw instead resolved my segfaults.
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.
Ah, nevermind. pointers must be 8 bytes aligned it seems.
No description provided.