3 ms·
My point is really that rust allows you to build those abstractions, regardless of that specific one. Sure, the kernel has reusable things like its embedded li
by TheDong 9y ago
My point is really that rust allows you to build those abstractions, regardless of that specific one.
Sure, the kernel has reusable things like its embedded linked list etc, but they're not type-safe, and they can't represent ownership.
With rust's type-system, a generic rc-like thing could be created which is suitable for the world of the kernel, even if it's not the stdlib Rc.
- zaarn 9y agoYou can't have RC until you have setup a heap. The stack is not a safe place to put these things. Without any memory management, things get hard fast, especially considering you still need to parse the memory layout to find out which parts of memory are even usable.
- Dylan16807 9y agoThe original comment was "Rc<T> in rust is much easier to use without screwing up than the manually handled reference counters littered throughout the kernel." That's heap vs. heap. It comes after the very brief stage you're mentioning.