摘要:
Physical memory、Pagefile和进程地址空间的关系--搞搞清爽啦! 当用户进程中的一个线程试图访问进程的地址空间中的一个数据块的时候。一般会发生两种情况: 1. 线程试图访问的数据是在RAM中,则cpu只需要将虚拟地址mapping到内存的物理地址中,然后执行需要的访问。 2. 数据不在RAM中,而是放在页文件的某个地方。这时候,访问引起页面失效,cpu将通知操作系统,操作系统... 阅读全文
posted @ 2008-06-27 23:36
能巴
阅读(273)
评论(0)
推荐(0)
摘要:
1. 反转一个string const int SIZE = 100; char a[SIZE]; cin.getline(a, SIZE); size_t nChar = strlen(a); char chTmp; for(size_t i = 0, j = nChar-1; i < j; ++i, --j) { chTmp = a[i]; a[i] = a[j]; ... 阅读全文
posted @ 2008-06-27 16:22
能巴
阅读(230)
评论(0)
推荐(0)
摘要:
string strValue; // STL string. cin >> strValue; strValue.replace(strValue.begin(), strValue.end(), strValue.rbegin(), strValue.rend()); cout << strValue; Please learn STL in deep! 阅读全文
posted @ 2008-06-27 15:58
能巴
阅读(402)
评论(0)
推荐(0)

浙公网安备 33010602011771号