Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!quame!bryan From: bryan@quame.UUCP (Bryan A. Woodruff) Newsgroups: comp.lang.c Subject: Re: Helps wanted on Microsoft C compiler. Summary: Help with MSC Message-ID: <122@quame.UUCP> Date: 7 Dec 89 03:47:22 GMT References: <16013@pollux.UUCP> <21795@ut-emx.UUCP> Organization: Quality America, Inc -- Tucson, AZ Lines: 25 In article <16013@pollux.UUCP> jwang@smu.edu (Jainbai Wang) writes: >When programming with Microsoft C lately, I run into a problem that the >MSC compiler gives the following error message at compiling time : > > Fatal error C1059 : out of near heap space > >The manual explains it like this : > > The compiler has run out of storage for items that it stores > in the "near" (default data segment) heap. This usually means > that your program has too many symbols or complex expressions. > To correct the problem, divide the file into several smaller > source files, or break expressions into smaller subexpressions. > Which version of MSC are you using... if 5.1 and you are using the LARGE memory model, you may have problems with near default data segments. You can fix this by setting the /Gt switch... syntax is /Gt n where n is the largest size of strings (constant and static data) that will be stored in the near segment... Play with the value, eventually you will find a value that works for you. My /Gt switches are set to 20. Bryan Woodruff, Product Manager, Quality America, Inc.