From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Global Variable space in DJGPP Date: Tue, 29 Oct 1996 19:49:12 -0800 Organization: Three pounds of chaos and a pinch of salt Lines: 27 Message-ID: <3276D038.149A@cs.com> References: <32769708 DOT 3408 AT dana DOT ucc DOT nau DOT edu> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp107.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Mike Ryan To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Mike Ryan wrote: > > Is there a limit to global var space in DJGPP. Right now I am making a > game in Borland C++ 4.51 and I ran out of global space. (64K). > > I was just wondering if there is a global var limit in DJGPP since it is > protected mode... Yes, there is a global variable limit: the available physical + virtual memory on your computer or 4 *gigabytes*, whichever is less. There are substantial advantages to 32-bit addressing. :) For more information on DJGPP, visit http://www.delorie.com/djgpp, or download the file ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/readme.1st. P.S.: Programming tip - If you need lots of memory, it's always better to simply malloc() it than to use global variables. That way you get around segment limits and other problems. In Borland, however, you still need to keep the size of individual structures at 64K or less. -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | Plan: To find ANYONE willing to | http://www.cs.com/fighteer | | play Descent 2 on DWANGO! | Tagline: | ---------------------------------------------------------------------