You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't get the rationale for having a custom allocator though, shouldn't it be explained at the start? Wouldn't default rust allocator be good for this?
The text was updated successfully, but these errors were encountered:
Yes, thank you, it does seem I need to explain better in the text why I have taken this approach.
An explanation:
It is entirely valid to take a native rust std approach such as Rc/Arc. Many interpreter projects in Rust have done so.
The next level of complexity is to use something similar in API to Rc but that handles cycles and has a distinct collection phase, such as https://github.com/Manishearth/rust-gc/
In both the above situations, the std collections can be used.
I wanted to demonstrate building allocation, data structures and collection from the ground up so that the interested reader can understand the specific challenges and solutions that are experienced in Rust.
At the time of writing code, the default rust allocator and APIs were unstable and not yet suitable. The situation now might be different.
Hi, thanks for the book It is very helpful.
I don't get the rationale for having a custom allocator though, shouldn't it be explained at the start? Wouldn't default rust allocator be good for this?
The text was updated successfully, but these errors were encountered: