-
Notifications
You must be signed in to change notification settings - Fork 14
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
Weird allocation method #67
Comments
That's a good question. The simple answer is that I have just taken it from crossbeam-rs/crossbeam#338. But why was it done there? I could imagine that at the time this was written, some functions were just missing. I'm open to changing this at some point, but right now I don't think it's worth it. I'm considering to implement the What do you think about this? |
Seems to be good. |
Exactly, that's one of the reasons why I removed the Right now, the |
What users could see in |
I've created a possible implementation of |
RingBuffer was allocated by allocating Vec, then extract pointer, and forget Vec.
Just using
alloc::alloc::alloc(Layout::array::<T>(capacity).unwrap())
seems to be more natural.Why is this done?
The text was updated successfully, but these errors were encountered: