本地链中的生锈链接
Rusty Links in Local Chains
摘要:
Rust成功地应用所有权类型来控制内存分配。这限制了程序的拓扑结构,使得双向链表不能在Safe Rust中编程。我们描绘了如何将更灵活的“本地”所有权添加到Rust中,允许对对象的多个可变引用,只要每个引用都受对象的生命周期限制。为了维护线程安全,局部拥有的对象必须保持线程本地;为了维护内存安全,当其所有者的生存期到期时,可以释放局部对象。
英文摘要:
Rust successfully applies ownership types to control memory allocation. This restricts the programs' topologies to the point where doubly-linked lists cannot be programmed in Safe Rust. We sketch how more flexible "local" ownership could be added to Rust, permitting multiple mutable references to objects, provided each reference is bounded by the object's lifetime. To maintain thread-safety, locally owned objects must remain thread-local; to maintain memory safety, local objects can be deallocated when their owner's lifetime expires.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。