the.bay.news

Intrusive data structure benefits over normal ones

The Rust Programming Language Forum
Intrusive data structure benefits over normal ones
hello, I am trying to understand intrusive data structure with this linked list example. I understand that for T to be an element of a single linked list it must store a pointer to next inside of T, and thus containing a list embedded inside T itself. But how does this help? How is this better as compared to a normal singly linked list and how does this reduce the overall allocation? use std::cell::Cell; use std::marker::PhantomData; use std::ptr::NonNull; struct Foo { value: i32, nex...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.