Date: Wed, 18 May 94 16:11:36 cst From: rothfusza AT osprey DOT nwrc DOT gov Encoding: 2059 Text To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Ver. 1.10 question about new[] Problem Statement: The following code is supposed to test the virtual memory capability of djgpp go32 v. 1.10 by allocating more memory than I have. The program causes a cold reboot of my machine at various points in the array initialization loop, depending upon how much EMS I have reserved via EMM386. Requested Info: Why does it crash and why does it depend upon the amount of EMS? System Info: i486DX/66 16MB RAM 300MB Free on disk DOS 5 using 4DOS EMM386 settings: DEVICE=C:\WINDOWS\EMM386.EXE ON M9 X=CC00-CfFF 8000 RAM REM This provides about 8MB of EMS, which causes the REM program to crash soon after the 7*1024*1024th element REM of ra[] is initialized. With 2MB EMS, program crashes after 5*MEG With 12MB EMS, program crashes after 8*MEG Providing more or fewer FILES handles does not change anything. compile line: gcc -o memtest.g32 memtest.cc -lgpl Code:----------------------------------------------------- #include #define MEG (1024L*1024L) void main(){ long* ra; long sz=MEG*10L; long i; cout<<"about to new "<=0;i--){ if((i%10000L)==0)cout<