11 ms·
I probably shouldn't even be in this thread but isn't that creeping back toward garbage collection?
by mousepilot 5y ago
I probably shouldn't even be in this thread but isn't that creeping back toward garbage collection?
- staticassertion 5y agoSure, it's just a mark and sweep, but manually implemented (which is fine).
- masklinn 5y agoIt’s completely normal to have this sort of things in low-level code bases. Both C++ and Rust have refcounting smart pointers in their standard libraries, and bespoke refcounting schemes are regular occurrences in C codebases (the Linux kernel has tons of refcounting, so much so that it has a utility file for reference counters: https://github.com/torvalds/linux/blob/master/include/linux/refcount.h https://github.com/torvalds/linux/blob/master/include/linux/...)
- mousepilot 5y agothanks for the response! I'm a big fan of doubly linked lists, so it was interesting to see that there was extra work to get them going. I'm certainly going to read up on this "ownership" thing. I get the impression that its there for really good reasons, and I'm not going to argue with experts who are protecting users. I have a question for you, would you say that the increase of difficulties with doubly linked lists are incidental in nature, or is there something inherent with doubly linked lists that impact security? Like I said, I like the doubly linked lists for certain things, and the more I know about the impact of using them the better! I certainly will be reading up on this!