03 2023 档案
摘要:出现伪共享原因:多个线程同时读写同一个 Cache Line 的不同变量时,而导致 CPU Cache 失效的现象称为伪共享(False Sharing) 查看系统Cache Line加载数据大小 cat /sys/devices/system/cpu/cpu0/cache/index0/coher
阅读全文
摘要:六种默认函数 class Base { public: Base() = default; // 无参构造函数 Base(const Base& obj) = default; // 拷贝构造 Base(Base&& obj) = default; // 移动构造 Base& operator= (
阅读全文