现象 Mqtt Consumer应该收到的消息少于预期,登录ActiveMQ的管理页面里的Topics,查看Messages Enqueued发现同样少于理应接收的数量. 定位问题 怀疑是TCP丢包,通过netstat -s命令观察发送消息前后Tcp信息的输出 对比两次Tcp信息的输出,发现packets pruned from receive queue because of socket buffer overrun与packets collapsed in receive queue du
Compile flags: /GS: Stack protection from buffer overrun. /SDL: Subset of W3&W4 security warnings as errors. Use warning 4. /WX: Treat Warnings As Errors. Linker flags: /DYNAMICBASE: Randomize module base address to ensure that our code is at differe
具体内容参看文件<CppCheck和PreFast对Cplusplus代码静态分析测试.zip> C++测试源代码main.cpp #define NULL 0 #include <stdio.h> #include <string.h> // 没有初始化 void defect1() { int a; int b; b = a; } // 空指针取值 void defect2( int b, int c) { int * p = NULL; int a = 1 ; i
More info see: https://msdn.microsoft.com/en-us/library/hh916383.aspx Simply stated, SAL is an inexpensive way to let the compiler check your code for you. The Microsoft source-code annotation language (SAL) provides a set of annotations that you can
USBD_STATUS调试过USB的同学肯定见过BUS Hound里面给的各种错误提示,但是大家是否知道是什么意思呢? USBD_STATUS 出错原因,详解如下: The USBD_STATUS data type defines USB status values for USB requests. typedef LONG USBD_STATUS; The most significant 4 bits of USB status values are defined in the
原文转自:http://hi.baidu.com/qiou2719/item/b9eed949130ff50ec0161331 C++常见错误大全 0. XXXX "is not a class or namespace"错误 最诡异的错误,提示意思很明显,说你写的名字既不是一个类也不是一个命名空间,虽然我C++水平不是很高,但再愚笨也不至于连类的格式class MyClass{....};也写不明白吧,报此错误原因显然跟它没关系,那又是怎么回事呢? 答案是:#includ
本文的目的不完全在于提供调优信息,而是在于告诉读者了解Linux kernel如何处理数据包,从而能够在 自己的实践中发挥Linux 内核协议栈最大的性能 The NIC ring buffer 接收环缓冲区在设备驱动程序和NIC之间共享. 网卡分配发送(TX)和接收(RX)环形缓冲区. 环形缓冲区是一个循环缓冲区,其中溢出只是覆盖现有数据. 应该注意,有两种方式将数据从NIC移动到内核,硬件中断和软件中断(也称为SoftIRQ). RX环形缓冲区用于存储传入的数据包,直到它们被设备驱动程序处理
Hyper fast Audio and Video encoderusage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Getting help: -h -- print basic options -h long -- print more options -h full -- print all options (including all format and code
Software Testing Part I:The Big Picture 1.Software Testing Background Bug's formal definition 1.The software doesn't do something that the product specification says it should do. 2.The software does something that the product specification says it s