从一次 double free 深入理解 shared_ptr 的原理与最佳实践

从实际开发中遇到的 double free 问题出发,系统剖析智能指针 shared_ptr 的工作原理与 shared_ptr 的六大使用陷阱,最后提供 shared_ptr 非线程安全版本和基于原子操作的线程安全实现。

C++
#C++#shared_ptr#内存泄露

堆(优先队列)

priority_queue 又称为 Heap

数据结构与算法
#LeetCode#数据结构

[FAST'24] TeRM

We present TeRM in this paper, an efficient approach to extending RDMA-attached memory with SSD. It onloads exception handling (i.e., RNIC page fault) from hardware to software. The experimental results on the microbenchmark and unmodified RDMA-based storage systems demonstrate the effectiveness of TeRM.

科研
#FAST

[FAST'20] An Empirical Guide of Persistent Memory

This paper has described the performance of Intel’s new Optane DIMMs across micro- and macro-level benchmarks. In doing so, we have extracted actionable guidelines for programmers to fully utilize these devices’ strengths. The devices have performance characteristics that lie in-between traditional storage and memory devices, yet they also present interesting performance pathologies. We believe that the devices will be useful in extending the quantity of memory available and in providing low-latency storage.

科研
#FAST

[FAST-25] GOGETAFS

We propose GOGETAFS, a novel DedupFS that leverages the file system mature I/O path and crash consistency mechanism to improve deduplication throughput. The key insight is to build a DedupFS with logical-fingerprint-physical (LFP), which is a novel mapping technique that merges the deduplication FP2P entry with the file system L2P entry. We implement and evaluate GOGETAFS in both PM and (emulated) ULL SSD platforms. The results suggest that GogetaFS outperforms existing DedupFSes, sometimes by an order of magnitude (e.g., in the SSD platform), and achieves minimized deduplication metadata maintenance overheads.

科研
#FAST
12345625

本站总访问量

本站共发表 123 篇文章 · 总计 542.2k 字
载入天数...载入时分秒...