上一页 1 2 3 4 5 6 7 8 ··· 13 下一页
摘要: https://blog.csdn.net/m0_37621078/article/details/89980205 阅读全文
posted @ 2021-08-29 21:24 wsl-hitsz 阅读(55) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<mutex> #include<thread> using namespace std; template<class T> class Shared_Ptr{ public: Shared_Ptr(T* ptr = nullptr) :_pP 阅读全文
posted @ 2021-08-25 16:08 wsl-hitsz 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 清楚认识到读写锁分为共享锁(读锁)和独占锁(写锁),可能通过设置标志位记录读锁调用的次数结合互斥锁实现共享锁。但需要注意的是,以下的实现在多个写锁被阻塞时非常消耗计算机资源。因为线程阻塞在写锁中而没有被投入睡眠,导致轮询策略。避免轮询可通过互斥锁+条件变量实现读写锁,具体实现见上一篇博文。 以下是代 阅读全文
posted @ 2021-08-25 15:59 wsl-hitsz 阅读(204) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/wz1226864411/article/details/77934941?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefa 阅读全文
posted @ 2021-08-24 22:51 wsl-hitsz 阅读(90) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/da3accfbe310 阅读全文
posted @ 2021-07-26 13:47 wsl-hitsz 阅读(34) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/duchenlong/article/details/105621055?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default 阅读全文
posted @ 2021-07-23 19:34 wsl-hitsz 阅读(42) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/u011693064/article/details/71629422?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default- 阅读全文
posted @ 2021-07-23 17:22 wsl-hitsz 阅读(198) 评论(0) 推荐(0) 编辑
摘要: https://zhuanlan.zhihu.com/p/37469260 单例模式的适用场景 资源共享的情况下,避免由于资源操作时导致的性能或损耗等。如上述中的日志文件,应用配置。 控制资源的情况下,方便资源之间的互相通信。如线程池等。 阅读全文
posted @ 2021-07-19 21:40 wsl-hitsz 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 好文参考: https://www.cnblogs.com/wangshaowei/p/14287125.html 为什么需要内存池 1、 效率问题, 如果我们直接想系统申请内存,当我们需要频繁的申请释放内存时,就需要频繁的与系统层产生交互,多次切换用户态以及内核态,而用户态与内核态的切换的消耗是非 阅读全文
posted @ 2021-07-19 21:04 wsl-hitsz 阅读(314) 评论(0) 推荐(0) 编辑
摘要: top 能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器 第一行,任务队列信息,同uptime 命令的执行结果 系统时间:07:27:05 运行时间:up 1:57 min, 当前登录用户: 3 user 负载均衡(uptime) load average: 0.00, 0 阅读全文
posted @ 2021-07-13 15:09 wsl-hitsz 阅读(89) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 13 下一页