内存异常处理

 1 /* 内存错误异常处理*/
 2 
 3 #include<iostream>
 4 #include<new>
 5 
 6 using namespace std;
 7 
 8 struct MyStruct
 9 {
10     double px[1024*1024*128];
11 };
12 
13 void main()
14 {
15     //double *p = new double[1024*1024*256];
16     
17     while (1)
18     {
19         MyStruct *p = new(std::nothrow) MyStruct[1024];
20     }
21 
22 
23     cin.get();
24 }

 

posted on 2015-06-16 14:57  Dragon-wuxl  阅读(169)  评论(0)    收藏  举报

导航