摘要:
volatile变量直接在CPU和内存之间交换,不通过一级、二级缓存。考虑下面的代码:代码:123456789101112131415161718class Gadget{public:void Wait() {while (!flag_){Sleep(1000); // sleeps for 10... 阅读全文
摘要:
本机:win7(x86),4G内存#include"stdafx.h"#include#include#include#includeusing namespace std;HANDLE hHeap;int _tmain(int argc, _TCHAR* argv[]){ SYSTEM_INFO ... 阅读全文
摘要:
#include #include #include using namespace std; int main() { SYSTEM_INFO systemInfo; GetSystemInfo(&systemInfo); cout <<setw(20) << "处理器掩... 阅读全文