Mail Archives: djgpp/1996/10/29/22:51:54
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: <this space for rent> |
---------------------------------------------------------------------
- Raw text -