Date: Mon, 18 Oct 1999 10:38:41 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: "sephiroth AT id-base DOT com" cc: djgpp AT delorie DOT com Subject: Re: Memory allocation limit? In-Reply-To: <380A114A.48B06112@id-base.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 17 Oct 1999, sephiroth AT id-base DOT com wrote: > Is there a limit to how much memory I can allocate with the c++ new > function in DJGPP? Of course, there is a limit. Invoke the go32-v2 program with no arguments: the sum of the two numbers it prints is the total amount of memory you can allocate in your DJGPP programs. > I seem to get the error: > Virtual memory exceeded in `new' > I looked at my program, and it appears that not much memory is > allocated( I can't put an exact figure on it, but no more than 5mb I > think ). How do you know it only allocates 5MB? Don't forget that some memory is allocated for the code, data, and stack of your program. The stack, for example, is 512KB. > If anyone can answer these questions, I would really appreciate > it. Take a look at Chapter 15 of the DJGPP FAQ list. It might give you some ideas. If that doesn't help, come back here, tell what you have found out and ask more specific questions.