运行下面这个程序试试,你就知道了(温馨提示:该程序不会对你的计算机造成伤害)。

#include <iostream>
using namespace std;

int main()
{
	int *p;
	while(1)
	{
		p = new int[1024 * 1024]; // 每次损失4MB
	}

	return 0;
}


本文转载:CSDN博客