From: Alejandro Martin Sanchez Newsgroups: comp.os.msdos.djgpp Subject: Answer to allocate memory for VAMPYR Date: Fri, 23 Jan 1998 19:14:46 -0300 Organization: Argentina On-Line Lines: 35 Message-ID: <34C91654.77322958@iname.com> NNTP-Posting-Host: pc2.cba.com.ar Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk VAMPYR wrote: > How to make DJGPP use memory more than 1MB(or more)? > > This is my test file: > =========================== > void main() > { > char array[1024000]; > } > =========================== > I compiled with "gcc test.c -o test.exe" , but it appears error! > How should I do? You should be use the "new" keyword to allocate memory. Example: void main(void) { char *foo; foo = new char [2000000L]; if (foo == NULL) { printf("Error: I can not allocate 2Mb\n"); return; } delete foo; } ================================================== Alejandro Martin Sanchez Cordoba, Argentina