<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[dajuc的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/dajuc</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; dajuc]]></copyright><item><title><![CDATA[C++ 智能指针：auto_ptr / unique_ptr / shared_ptr / weak_ptr 原理与使用]]></title><link>https://blog.csdn.net/dajuc/article/details/165126244</link><guid>https://blog.csdn.net/dajuc/article/details/165126244</guid><author>dajuc</author><pubDate>Sat, 12 Sep 2026 22:13:01 +0800</pubDate><description><![CDATA[智能指针拷贝核心原理适用场景auto_ptr转移所有权废弃不要用unique_ptr❌禁止拷贝 ✅支持 move独占资源独占所有权，默认首选shared_ptr✅支持拷贝引用计数需要多指针共享资源weak_ptr不持有资源不增加计数解决 shared_ptr 循环引用编码建议：优先用unique_ptr；确需共享再选shared_ptr；存在双向引用 / 环形结构，配合weak_ptr。]]></description><category></category></item><item><title><![CDATA[C++异常与RAII智能指针笔记]]></title><link>https://blog.csdn.net/dajuc/article/details/165008560</link><guid>https://blog.csdn.net/dajuc/article/details/165008560</guid><author>dajuc</author><pubDate>Fri, 11 Sep 2026 23:14:07 +0800</pubDate><description><![CDATA[程序出现问题时，可以通过throw抛出对象引发异常；抛出对象的类型，以及当前调用链，决定由哪个catch块处理。匹配规则：选中的catch是调用链里的那个。throw执行后，throw后面代码不再执行；程序跳转到匹配的catch。catch可以在当前函数，也可以在上层调用函数。控制权转移到catch，会沿着调用链提前退出函数。一旦进入异常处理流程，栈上创建的对象都会销毁。抛出异常对象时，会生成异常对象拷贝；catch处理完后销毁拷贝对象（C++11 后优化，减少拷贝）。]]></description><category></category></item><item><title><![CDATA[C++11 新特性：Lambda表达式、std::function与std::bind]]></title><link>https://blog.csdn.net/dajuc/article/details/164756560</link><guid>https://blog.csdn.net/dajuc/article/details/164756560</guid><author>dajuc</author><pubDate>Wed, 09 Sep 2026 21:11:05 +0800</pubDate><description><![CDATA[Lambda：快速写匿名的仿函数，适合一次性回调，代码简洁。：统一包装所有可调用对象，提供统一类型，用于回调容器。std::bind：改造已有函数，固定参数、调换参数顺序，适配接口。常见场景：容器算法传参、回调函数、事件驱动、策略模式。]]></description><category></category></item><item><title><![CDATA[C++11 核心新特性完整梳理]]></title><link>https://blog.csdn.net/dajuc/article/details/164632839</link><guid>https://blog.csdn.net/dajuc/article/details/164632839</guid><author>dajuc</author><pubDate>Tue, 08 Sep 2026 23:55:07 +0800</pubDate><description><![CDATA[范围 for 底层就是调用。]]></description><category></category></item><item><title><![CDATA[C++11 核心新特性总结]]></title><link>https://blog.csdn.net/dajuc/article/details/164470125</link><guid>https://blog.csdn.net/dajuc/article/details/164470125</guid><author>dajuc</author><pubDate>Mon, 07 Sep 2026 16:24:25 +0800</pubDate><description><![CDATA[左值右值区分：能不能取地址；右值引用变量自身是左值。移动语义：解决临时对象拷贝开销；move 只是类型转换，不移动资源。RVO/NRVO 编译器返回值优化，移动语义是保底。引用折叠规则，万能引用T&&，std::forward 完美转发。initializer_list 实现容器大括号初始化。emplace_back 原地构造对比 push_back。]]></description><category></category></item><item><title><![CDATA[C++哈希表深度剖析：冲突处理、rehash、迭代器与unordered容器封装]]></title><link>https://blog.csdn.net/dajuc/article/details/164371255</link><guid>https://blog.csdn.net/dajuc/article/details/164371255</guid><author>dajuc</author><pubDate>Fri, 04 Sep 2026 16:27:00 +0800</pubDate><description><![CDATA[底层是开链哈希表，很多人只会调用 API，搞不懂底层冲突、扩容、迭代器逻辑，本文结合原理图把底层讲透。]]></description><category></category></item><item><title><![CDATA[C++哈希表：unordered_set / unordered_map底层原理]]></title><link>https://blog.csdn.net/dajuc/article/details/164301707</link><guid>https://blog.csdn.net/dajuc/article/details/164301707</guid><author>dajuc</author><pubDate>Wed, 02 Sep 2026 17:30:17 +0800</pubDate><description><![CDATA[如果是自定义类，必须提供两个东西：哈希函数hash<T>，把对象转为 size_t 哈希值；，实现 == 运算符。int id;// 自定义哈希函数template<>哈希桶（链地址法），数组 + 链表；set 底层红黑树。哈希冲突：不同 key 哈希映射同一位置；解决：开放定址、链地址法；STL 用链地址法。负载因子：元素数量 / 桶数量；超过阈值触发 rehash，重新分配桶数组，全部元素重新哈希。]]></description><category></category></item><item><title><![CDATA[STL底层：红黑树封装实现 set & map]]></title><link>https://blog.csdn.net/dajuc/article/details/164194224</link><guid>https://blog.csdn.net/dajuc/article/details/164194224</guid><author>dajuc</author><pubDate>Sun, 30 Aug 2026 23:23:19 +0800</pubDate><description><![CDATA[为什么 set 迭代器是 const？set 存储元素就是 key，如果允许修改，会破坏二叉搜索树有序性，所以普通迭代器也 const。map 的 pair.first 是 const，second 可以修改。KeyOfValue/Identity/Select1st 的作用实现一套 rb_tree 复用给 set、map，解耦存储值和比较用的 key。set 值就是 key；map 值是 pair，key 是 pair.first。map 的 operator [] 细节[]会隐式插入；]]></description><category></category></item><item><title><![CDATA[C语言main函数命令行参数argc与argv详解]]></title><link>https://blog.csdn.net/dajuc/article/details/164171390</link><guid>https://blog.csdn.net/dajuc/article/details/164171390</guid><author>dajuc</author><pubDate>Sat, 29 Aug 2026 16:56:17 +0800</pubDate><description><![CDATA[argc统计参数数量，argv保存参数字符串；argv[0]固定是程序名，argv[argc]一定是 NULL；参数分割由 shell 完成，C 程序只负责接收；Linux 工具大量基于命令行参数实现多选项功能。]]></description><category></category></item><item><title><![CDATA[C++ 红黑树详解]]></title><link>https://blog.csdn.net/dajuc/article/details/164112435</link><guid>https://blog.csdn.net/dajuc/article/details/164112435</guid><author>dajuc</author><pubDate>Thu, 27 Aug 2026 10:42:18 +0800</pubDate><description><![CDATA[红黑树是一棵，它是接近平衡的二叉树。]]></description><category></category></item><item><title><![CDATA[Linux进程切换]]></title><link>https://blog.csdn.net/dajuc/article/details/164098333</link><guid>https://blog.csdn.net/dajuc/article/details/164098333</guid><author>dajuc</author><pubDate>Wed, 26 Aug 2026 22:54:02 +0800</pubDate><description><![CDATA[进程切换做什么：保存旧进程上下文，选新进程，恢复新进程上下文，切换地址空间。切换开销：寄存器保存恢复、页表切换、TLB 缓存失效。O (1) 调度器核心：active/expired 双数组，位图快速找最高优先级就绪进程。nice 取值‑20~19，越大优先级越低。并发靠进程切换实现；并行需要多核 CPU。]]></description><category></category></item><item><title><![CDATA[AVL树（平衡二叉搜索树）]]></title><link>https://blog.csdn.net/dajuc/article/details/164063153</link><guid>https://blog.csdn.net/dajuc/article/details/164063153</guid><author>dajuc</author><pubDate>Tue, 25 Aug 2026 18:39:49 +0800</pubDate><description><![CDATA[int _bf;//平衡因子:_kv(kv),_bf(0){}_parent：父指针，旋转需要向上回溯更新平衡因子_bf：平衡因子。]]></description><category></category></item><item><title><![CDATA[C++ STL set与map底层原理详解]]></title><link>https://blog.csdn.net/dajuc/article/details/163896770</link><guid>https://blog.csdn.net/dajuc/article/details/163896770</guid><author>dajuc</author><pubDate>Wed, 19 Aug 2026 23:54:41 +0800</pubDate><description><![CDATA[容器存储内容是否允许重复可修改内容底层遍历setT（就是 key）不允许全部只读，不可修改红黑树中序，有序multisetT允许全部只读，不可修改红黑树中序，有序map<K,V>key 不重复key 不可改，value 可修改红黑树中序，按 key 有序key 允许重复key 不可改，value 可修改红黑树中序，按 key 有序。]]></description><category></category></item><item><title><![CDATA[C++ 二叉搜索树原理与实现]]></title><link>https://blog.csdn.net/dajuc/article/details/163863337</link><guid>https://blog.csdn.net/dajuc/article/details/163863337</guid><author>dajuc</author><pubDate>Tue, 18 Aug 2026 20:36:56 +0800</pubDate><description><![CDATA[K _key;:_key(key){}key‑value 版本，节点多存一个 value 成员；set只存 key，map存。]]></description><category></category></item><item><title><![CDATA[C++虚函数表深度解析｜看懂多态底层汇编]]></title><link>https://blog.csdn.net/dajuc/article/details/163784804</link><guid>https://blog.csdn.net/dajuc/article/details/163784804</guid><author>dajuc</author><pubDate>Sat, 15 Aug 2026 23:55:35 +0800</pubDate><description><![CDATA[函数指针数组，数组里面存放本类所有虚函数的地址。_vfptr：对象内指针，指向这张函数指针数组。同类型多个对象，_vfptr都指向同一个虚表，节省内存。不同类（父类、派生类）拥有各自独立虚表。只要类有虚函数，对象开头增加虚表指针；虚表多个对象共享一张。派生类重写虚函数：派生类虚表对应下标位置替换为自己函数地址。多态三要素缺一不可：①父类函数 virtual 虚函数②派生类完成重写 override③使用父类指针 / 引用接收子类对象满足多态：运行查表；不满足：编译期直接调用。]]></description><category></category></item><item><title><![CDATA[Linux进程状态详解｜看懂PCB、运行、阻塞、僵尸与孤儿进程很多同学学进程]]></title><link>https://blog.csdn.net/dajuc/article/details/163763367</link><guid>https://blog.csdn.net/dajuc/article/details/163763367</guid><author>dajuc</author><pubDate>Fri, 14 Aug 2026 22:51:01 +0800</pubDate><description><![CDATA[很多同学学进程，只背 R/S/D/Z 这几个字母，遇到ps aux输出就一脸茫然。本文从内核视角讲清楚进程状态流转、swap 交换、僵尸进程、孤儿进程底层原理。]]></description><category></category></item><item><title><![CDATA[C++继承与多态核心笔记｜菱形继承、组合、虚函数、纯虚函数一网打尽]]></title><link>https://blog.csdn.net/dajuc/article/details/163707253</link><guid>https://blog.csdn.net/dajuc/article/details/163707253</guid><author>dajuc</author><pubDate>Wed, 12 Aug 2026 23:34:38 +0800</pubDate><description><![CDATA[一个派生类只有，就是单继承。]]></description><category></category></item><item><title><![CDATA[Linux进程｜从程序到进程，看懂PCB与进程切换]]></title><link>https://blog.csdn.net/dajuc/article/details/163645676</link><guid>https://blog.csdn.net/dajuc/article/details/163645676</guid><author>dajuc</author><pubDate>Mon, 10 Aug 2026 21:52:41 +0800</pubDate><description><![CDATA[磁盘上的普通文件，存放代码与数据，是静态的，躺在硬盘里不会运行。：程序加载到内存之后，，是动态运行的实体。双击 exe、Linux 运行可执行程序，本质就是把磁盘程序加载进内存，操作系统创建 PCB，生成进程。程序可以被多次加载，生成多个不同进程；一个进程对应一份 PCB。OS 使用（PCB 进程控制块）描述管理每一个进程，内核中所有进程的 task_struct 通过链表组织起来，操作系统靠这个链表找到全部进程。]]></description><category></category></item><item><title><![CDATA[操作系统入门：到底什么是操作系统、什么是进程]]></title><link>https://blog.csdn.net/dajuc/article/details/163616730</link><guid>https://blog.csdn.net/dajuc/article/details/163616730</guid><author>dajuc</author><pubDate>Sun, 09 Aug 2026 22:15:38 +0800</pubDate><description><![CDATA[很多同学刚学操作系统，上来就背概念：进程管理、内存管理、文件管理、驱动管理。背完依旧一头雾水，搞不懂 OS 为什么要这么设计。今天用现实类比把底层逻辑讲透。]]></description><category></category></item><item><title><![CDATA[C++继承核心知识点总结]]></title><link>https://blog.csdn.net/dajuc/article/details/163596052</link><guid>https://blog.csdn.net/dajuc/article/details/163596052</guid><author>dajuc</author><pubDate>Sat, 08 Aug 2026 23:19:50 +0800</pubDate><description><![CDATA[子类同名成员会屏蔽基类同名成员直接访问。注意：不是重载！重载要求。]]></description><category></category></item></channel></rss>