04 2022 档案
C++ STL chrono和clock_gettime的性能对比
摘要:#include <iostream> #include <chrono> #include <ctime> int main() { const int ts = 1000000; std::chrono::steady_clock::time_point beg; std::chrono::st 阅读全文
posted @ 2022-04-23 16:09 coding my life 阅读(2831) 评论(0) 推荐(0)
Program terminated with signal 4, Illegal instruction
摘要:一个已进入维护状态多年的项目最近我做了一些优化,没想到更新出去后程序直接起不来了,core dump的文件显示程序因为Program terminated with signal 4, Illegal instruction.直接挂掉。第一次看到这个错误的我有点懵,从字面上理解“Illegal in 阅读全文
posted @ 2022-04-16 16:29 coding my life 阅读(2678) 评论(0) 推荐(0)
Linux LVM分区扩容
摘要:我经常用虚拟机装各种版本的Linux系统来跑程序,一般硬盘分得比较小。比如CentOS 6就只分了16G,跑的是服务端的程序,不用安装界面,整个系统也就占3G不到,一般也够用。直到某一天,我需要把一个20G的sql脚本导入到数据库里。这才发觉自己从来没做过Linux的硬盘扩容,一番鼓捣之后,做个笔记 阅读全文
posted @ 2022-04-01 22:04 coding my life 阅读(3229) 评论(0) 推荐(0)