Re: [Dev-C++] not enough memory - how to configure Win2000
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: staale <st...@le...> - 2002-05-08 13:18:03
|
I have tried my sample program on a w2k machine now and it work al the way up to 31 (thats wher you meet the long border is it not)? If you send me your compiled binary, I'll giv it a try. (hmm, could be during thge weekend as I'm sceduled for the next 48 houers.:o) Also if you search for the drwtsn32.log file. Giv it a new name, delete it or what ever. Run the test program again. And then include the drwtsn32.log file in your mail to me. I might be able to help a litle bit more. The drwtsn32.log is a simpel debug dump file (I think www.sysinternals.com has an articel on how to read it). A thought, how do you start the program? From the Dev-C IDE or in a console window? If you use start-run-command.exe I belive you will be runing a nativ DOS session. You should use start-run-cmd.exe (don't nead the exe part) to get flat memmory. The last is what you get if you double click the pBigArray.exe from explorer. On the side line (this is not a windows 2000 feature): I think XP has a 'feature' where it anticcipates which OS it should run the program under. In your case it seams like it is running like a nativ dos (win95) program. I have no experience with XP my self so don't take my word for it.:o) I know that it is posible to turn the 'feature' off for particular programs. I think you rightclick the program and then select configuration from the pop-up menu. I wold assume you will have to do the same with all the programs in the bin folder of Dev-C to. Best regards Staale ----- Original Message ----- From: <jar...@ig...> To: <st...@le...> Cc: <h....@ch...> Sent: Wednesday, May 08, 2002 9:38 AM Subject: Re: [Dev-C++] not enough memory - how to configure Win2000 > On 7 May, staale wrote: > > Try the code below. I have allocated 30MB successfully on NT4 with SP6. Are > > you running NT or a win9x OS? They allocate memmory diffrently. (I'm no > > expert in how, just know they do..:o)) > > > > If you are running NT4, w2k (or XP) you get the task manager with > > Ctrl+Shift+Esc. There you can see how much memmory the program does use > > (hmm, sort of...) > > > > This is with devcpp version 4.9.2.9 from Hongli Lai. > > Many thanks! > > I have run your program (included below for reference) on my > Win 2000 SP2 box with 4096 Mb real memory and 2048 Mb swap space > (dual PIII) > > Running your program with input '1' (i.e. 1 Mb) it works just fine. > Inputting '2' or even more it crashes immediately (it doesn't reach > the 'system("PAUSE");' line. > > Displaying the event log I get > Source: DrWatson Event: 4097 > > Since I am a novice (? ignorant) w.r.t. Windows (I just do it for > my students) I have no idea what I can change. > (There are no memory problems. The box runs fine with all of its memory > under Linux for 'real' work) > > Many thanks for your help, > Helmut. > > > -- > Helmut Jarausch > > Lehrstuhl fuer Numerische Mathematik > Institute of Technology, RWTH Aachen > D 52056 Aachen, Germany > > ----- > > program given by Staale > > #include <iostream> > #include <stdio.h> > #include <stdlib.h> > > int main(int argc, char *argv[]) > { > const long MEGA_BYTE = 1024*1024; > long nMBSize = 1; > while (nMBSize != 0 ){ > cout << "Give MB size: "; > cin >> nMBSize; > char narrBig[nMBSize * MEGA_BYTE]; > cout << "char size: " << sizeof(char) << " Bytes." << endl; > cout << "Array size: " << sizeof(narrBig)<< " Bytes." << endl; > file://See if initializing each element makes a difference > for (unsigned long i = 0; i<nMBSize*MEGA_BYTE;i++){ > narrBig[i] = 'A'; > }//i > cout << "Array size: " << sizeof(narrBig) << endl; > file://If you store objects in the array remember to use: > delete []narrBig; > }//while (nMB.. > file://To have a breake before window closes, use: > system("PAUSE"); > return 0; > } > > > |