From: "Charles Sandmann" Newsgroups: comp.os.msdos.djgpp Subject: Re: Quake srcs - memory problems Date: Tue, 11 Jul 2000 22:33:18 Organization: Aspen Technology, Inc. Lines: 18 Message-ID: <396ba0ae.sandmann@clio.rice.edu> References: <8kfsq9$5cg$1 AT onlinenews DOT germany DOT net> NNTP-Posting-Host: dcloan.hou.aspentech.com X-Trace: selma.aspentech.com 963373241 18709 10.32.115.107 (12 Jul 2000 03:40:41 GMT) X-Complaints-To: postmaster AT aspentech DOT com NNTP-Posting-Date: 12 Jul 2000 03:40:41 GMT X-NewsEditor: ED-1.5.8 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > >#include > >int _crt0_startup_flags = _CRT0_FLAG_UNIX_SBRK; > > but for some strange reason I never touched the _CRT0_FLAG_UNIX_SBRK... > > I belief the error occured because the original quake.exe that was shipped > with the game was compiled on a unix-machine with a cross-to-dos compiler > that switched _CRT0_FLAG_UNIX_SBRK on as standard i belief. No, the original quake.exe was built with pre-release version of DJGPP (v2.0 beta 3) which had the unixy sbrk() algorithm on by default and did not support the current default sbrk() algorithm. To work around the problem of the address space moving (so they could still use near pointers) all the memory was allocated up front. Since beta 3 was actually more stable than beta 4 - and there were no bugs in beta 3 which made any difference whatsoever to Quake, they chose never to upgrade and just shipped the binary built with beta 3.