3 ms·
With a strong ownership model like Rust’s, the type system can essentially be used to handle the case of a ref count of zero or one. (I haven’t actually looked
by chrismorgan 10y ago
With a strong ownership model like Rust’s, the type system can essentially be used to handle the case of a ref count of zero or one.
(I haven’t actually looked at the Sanakirja code.)
- pmeunier 10y agoAuthor here. So I thought when I started the project. But when you think more about it, Rust cannot allocate in an mmapped file, so you're basically on your own, and have to do plain old C-like memory management in the file, except that unlike in C, there is the extra constraint that everything is transactional, pulling the machine's plug needs to "unfree" all freed pages, and "unalloc" all allocated pages.