64,683
社区成员
发帖
与我相关
我的任务
分享
try
{
int* a = new int[8000000000];
cout << "get memory" << endl;
}
catch(bad_alloc& ba)
{
cout << "catch the exception" << endl;
}
long long int k = 1024*1024*1024*36;
int *array = new int[k];//这里有1024*1024*1024*36个int,占用了1024*1024*1024*36*4=154618822656个字节