On 8/5/21 2:48 PM, Miguel Ojeda wrote:
On Thu, Aug 5, 2021 at 8:25 PM Phil Bouchard <boost@fornux.com> wrote:
- The memory manager has the property of being deterministic so no new random race conditions are involved, as such with garbage collector.
That is a no then. Rust guarantees the absence of data races and UB in general.

Root Pointer is thread safe as shown in my examples. I'll read more about the data races later, but general race conditions aren't gone with Rust:

https://doc.rust-lang.org/nomicon/races.html



- The only drawback is that sizeof(root_ptr) = sizeof(void *) x 4... but can be shrink to sizeof(void *) x 3;
So every pointer in the kernel would be triplicated? That is far from
ideal, even before discussing time costs.

Each one of them is derived from the other so you can use it as a simple shared_ptr, or cyclic-safe shared_ptr. The latter is just sizeof(void *) x 2. Kernel programmers should be smart enough to use a unique type for iterators. My implementation is just very generic.


Rust allows us to have more guarantees, without such a cost.

Cheers,
Miguel
--

Phil Bouchard
Founder & CTO
C.: (819) 328-4743

Fornux Logo