上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页
摘要: 包含的头文件: #include <dlfcn.h> 使用的函数有以下4个: 1) void * dlopen( const char * pathname, int mode) 参数pathname: 动态库so名称; 参数mode: 打开方式,有以下选项 RTLD_DEEPBIND -- 动态库 阅读全文
posted @ 2022-03-20 21:23 ho966 阅读(1056) 评论(0) 推荐(0) 编辑
摘要: 123 阅读全文
posted @ 2022-03-16 20:50 ho966 阅读(24) 评论(0) 推荐(0) 编辑
摘要: nload eno1 -u m(nload 网卡名称 -u 单位) 查看网卡吞吐量 watch -n 1 " date;netstat -nalp|grep 7302" sar -n DEV 1 4 查看网卡信息 阅读全文
posted @ 2021-09-10 11:45 ho966 阅读(31) 评论(0) 推荐(0) 编辑
摘要: strace -tt -T -v -f -e trace=file -o /data/log/strace.log -s 1024 -p 23489 -tt 在每行输出的前面,显示毫秒级别的时间-T 显示每次系统调用所花费的时间-v 对于某些相关调用,把完整的环境变量,文件stat结构等打出来。-f 阅读全文
posted @ 2021-09-09 19:08 ho966 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 1、 可以通过objcopy分离符号文件 objcopy --only-keep-debug a.out a.out.sym //拷贝出一个符号表文件 objcopy --strip-debug a.out //删除符号文件 gdb调试的时候添加符号文件命令 symbol-file a.out.sy 阅读全文
posted @ 2021-07-06 16:02 ho966 阅读(398) 评论(0) 推荐(0) 编辑
摘要: linux环境执行脚本文件时,如果这个文件是从win环境拷贝过来的,极有可能因为换行符的原因(win是\n\r, 而linux没有\r) 导致脚本执行失败, 所有需要去掉\r, 执行命令 sed -i "s/\r//" filename 就可以 阅读全文
posted @ 2021-05-24 11:26 ho966 阅读(36) 评论(0) 推荐(0) 编辑
摘要: std::deque是区别于vector和list的一种有序容器,可以像vector一样高效的取下标,却别于vector, deque可以高效的前插入,自我成长也比vector要高效些。但deque的迭代器操作是没有vector高效的,对deque排序也是异常复杂的,deque的数据结构如下图所示。 阅读全文
posted @ 2021-03-02 11:14 ho966 阅读(231) 评论(0) 推荐(0) 编辑
摘要: std::set template <typename Tp> struct Identity_ { const Tp& operator()(const Tp& x) const { return x; } }; template <typename Key, typename Compare = 阅读全文
posted @ 2021-03-01 10:07 ho966 阅读(141) 评论(0) 推荐(0) 编辑
摘要: std::map的实现 template <typename Pair> struct Select1st_ { const typename Pair::first_type& operator()(const Pair& x) const { return x.first; } }; templ 阅读全文
posted @ 2021-02-27 22:51 ho966 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1、概念: 标准库的std::map、std::mulitmap、std::set、 std::multiset统称为关联式容器,其底层数据结构是基于红黑树实现的。 红黑树作为一种二叉树,满足以下规则: 1)每个节点不是红色就是黑色 2)根节点为黑色 3)如果节点为红色,其子节点必须为黑色 4)任何 阅读全文
posted @ 2021-02-27 16:02 ho966 阅读(106) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页