随笔分类 -  C++ Concurrency in Action

摘要:在 03. 无锁栈的内存管理 我们讨论了两种检测是否节点可以被删除的方法:reference count 和 hazard pointers 方法,但是事实上是它们的管理方式比较复杂,需要考虑的比较多,而说到生命周期的管理,我们很自然而然地会想到类似 std::shared_ptr<> 的使用,所以 阅读全文
posted @ 2025-04-01 07:45 rustic-stream 阅读(84) 评论(0) 推荐(0)
摘要:Managing memory in lock-free data structures 正如之前我们在上一章,一开始讨论的那样,为了防止 dangling pointer,我们将 5. delete old head 跳过,那这样会造成内存泄露 The basic problem is that 阅读全文
posted @ 2025-03-30 08:53 rustic-stream 阅读(40) 评论(0) 推荐(0)
摘要:C++ 并发编程实战 7.1 7.2 设计无锁栈部分 阅读全文
posted @ 2025-03-29 08:41 rustic-stream 阅读(70) 评论(0) 推荐(0)
摘要:C++的3种memory model: + sequentially consistent + relexed + acquire-release 对应5.3章 阅读全文
posted @ 2025-03-28 07:24 rustic-stream 阅读(60) 评论(0) 推荐(0)