brezezee


  • Home

  • Tags

  • Categories

  • Archives

  • About

Untitled

Posted on 2021-08-20 | Post modified: 2021-08-21 |
Words count in article: 335
123456# 查看当前运行的进程ps aux | grep a.out# 查看当前运行的轻量级进程 线程ps -aL | grep a.out# 查看主线程和新线程的关系pstree -p 主线程i ...
Read more »

Untitled

Posted on 2021-08-17 | Post modified: 2021-08-17 |
Words count in article: 59
锁竞争锁竞争造成的直接结果便是线程主动切换,因此可以统计线程的切换占比来判断是否发生了大量锁竞争。 1pidstat -w -l -p [pid] cswch/s表示切换率
Read more »

Untitled

Posted on 2021-08-14 | Post modified: 2021-08-14 |
Words count in article: 0
Read more »

Untitled

Posted on 2021-08-14 | Post modified: 2021-08-14 |
Words count in article: 0
Read more »

Untitled

Posted on 2021-07-30 | Post modified: 2021-09-12 |
Words count in article: 269
一些缺陷 公用引用计数,计数器通过new放在堆上,引起性能问题 引用计数的内存位置和数据的内存位置不一致,缓存失效等性能问题 容易出现一个对象被绑定了两个引用计数,双重删除。 解决方法 std::m ...
Read more »

gdb基本命令

Posted on 2021-06-10 | Post modified: 2021-07-11 | In tools |
Words count in article: 3.2k
文件分析指令123456file xxx # 查看文件格式信息size *.o # 查看ELF各个段的长度objdump -h *.o # 查看目标文件结构和信息 -h(段信息) -sd(以16 ...
Read more »

Traits-STL

Posted on 2021-05-26 | Post modified: 2021-07-02 | In C++ |
Words count in article: 1.9k
背景在STL迭代器中,为了适配不同类型的容器,常常需要迭代器主动获取 迭代器指向的类型,并且申明该类型的变量。模板函数的参数推导功能可用于推导变量类型 12345678910111213141516 ...
Read more »

Untitled

Posted on 2021-03-23 | Post modified: 2021-03-23 |
Words count in article: 159
和为K的子数组 要求和为k的连续子数组 思路大概是 遍历的时候维护前缀和,通过hash表记录这些和,每次用当前前缀和 - k 看是否有满足的点,若有则是满足条件的子数组,哈希映射的值应该是该和 出现 ...
Read more »

Untitled

Posted on 2021-03-21 | Post modified: 2021-08-16 |
Words count in article: 494
awk、sed、grep更适合的方向: grep 更适合单纯的查找或匹配文本 sed 更适合编辑匹配到的文本 awk 更适合格式化文本,对文本进行较复杂格式处理 grepsed基本命令1sed [ ...
Read more »

Untitled

Posted on 2021-03-13 | Post modified: 2021-04-05 |
Words count in article: 517
公交路线 给你一个数组 routes ,表示一系列公交线路,其中每个 routes[i] 表示一条公交线路,第 i 辆公交车将会在上面循环行驶。 例如,路线 routes[0] = [1, 5, 7] ...
Read more »
12…8

brezezee

靡不有初,鲜克有终

79 posts
15 categories
74 tags
© 2021 brezezee | Site words total count: 154.8k
Powered by Hexo
|
Theme — NexT.Mist v5.1.4