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-07 18:34:08
|
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...)
Why does Outlook insert file: infront of all //. Sorry but you have to
remove that by hand (Courtesy to M$)..
I think you shuld do some debugging. Install the Insight5_win32 debugger and
you should be well off.
------------ code snip -----------
#include <iostream>
file://#include <stdio.h>
file://#include <stdlib.h> file://usedt by system("PAUSE")
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:
file://system("PAUSE");
return 0;
}
------------ code snip end -------
Best regards
Staale Flock
----- Original Message -----
From: <jar...@ig...>
To: <dev...@li...>
Sent: Tuesday, May 07, 2002 1:26 PM
Subject: [Dev-C++] not enough memory - how to configure Win2000
> Hi all,
>
> I probably have a very common and simple question,
> but WinXXX is not my primary OS.
>
> When I start an application with Dev-C++ (4.9.2.9)
> I have not enough memory under Win2000
> How can I configure Win2000 to give DOS more
> extended memory (there are 4 Gb memory available!)
>
> Thanks for a hint,
>
> Helmut Jarausch
>
> Lehrstuhl fuer Numerische Mathematik
> Institute of Technology, RWTH Aachen
> D 52056 Aachen, Germany
>
>
> _______________________________________________________________
>
> Have big pipes? SourceForge.net is looking for download mirrors. We supply
> the hardware. You get the recognition. Email Us: ban...@so...
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|