-
Notifications
You must be signed in to change notification settings - Fork 1
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
Future plans for this crate #2
Comments
They're pretty necessary for it to work truly as a memory arena, without the placement new/placement in functionality we'd have to construct objects on the stack and copy them over into the arena. It's maybe not so bad for some use cases, but adds some cost which we don't incur right now. Other uses like allocating something larger than can be put on the stack in the arena would no longer work. Hopefully the feature will make its way back into Rust soon, this is pretty unfortunate to see go. The feature has been pretty stagnant lately though. |
I looked into this a bit, as I was wondering how something like I also had a look at the rust compiler. I knew it had a |
Interesting about
|
I quickly hacked up light_arena to remove the use of I managed to get the tests to pass, except the ones that try to allocate an array bigger than 2MB, which shows that the stack allocation isn't optimized away :( I guess I've adapted my raytracer to use the modified version, and it seems to work fine. I haven't noticed any performance impact so far, but I've only tested with a very simple scene... I guess this will have to do until a better solution comes up. |
Looks good! For allocating the buffers in my renderer I can switch them to using some I wonder if this is best released as a separate temporary crate and we can mark light arena as "temporarily broken" while placement new gets worked out. We could maintain the code in a branch in this repo, but release it under some other name I guess. I'll find some time to test out |
Any of these options if fine by me. The one thing I haven't done is modify the documentation and the doc tests because I was lazy :) Let me know how your test goes! |
Hey @abusch , sorry for the (extreme) delay, I got back to this and merged in your PR to have the crate act for now as more of memory pool. Then we'll see where the rust placement new stuff ends up and I can update it later when the feature stabilizes. |
Hi,
it seems that the
placement_in
and related features are scheduled to be removed soon, as they have some unresolved issues and have been in limbo for a while. See rust-lang/rust#48333 (they might come back one day under a different form...).How necessary are these features for
light_arena
to work? Unfortunately crates.io doesn't offer many alternatives :(The text was updated successfully, but these errors were encountered: