2021年5月26日

摘要: Valgrind工具详解 1.Memcheck 最常用的工具,用来检测程序中出现的内存问题,所有对内存的读写都会被检测到,一切对malloc、free、new、delete的调用都会被捕获。所以,它能检测以下问题: 1、对未初始化内存的使用; 2、读/写释放后的内存块; 3、读/写超出malloc分 阅读全文
posted @ 2021-05-26 14:53 tycoon3 阅读(392) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> void main() { int *ptr = (int *)0; *ptr = 100; } root@ubuntu:~/c++# gcc seg.c -o seg root@ubuntu:~/c++# ./seg Seg 阅读全文
posted @ 2021-05-26 11:42 tycoon3 阅读(175) 评论(0) 推荐(0)
摘要: root@ubuntu:~/c++# ./u_server Listener on port /tmp/echo_socket Waiting for connections ... Welcome message sent successfully Adding to list of socket 阅读全文
posted @ 2021-05-26 09:54 tycoon3 阅读(104) 评论(0) 推荐(0)

导航