www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/14/00:25:52

From: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: sbrk(0) return value
Date: Sun, 13 Feb 2000 21:03:25
Organization: Aspen Technology, Inc.
Lines: 13
Message-ID: <38a71c1d.sandmann@clio.rice.edu>
References: <MsN45BA3Qrp4Ewjf AT lwithers DOT demon DOT co DOT uk>
NNTP-Posting-Host: dcloan.aco.aspentech.com
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

> I'm currently playing around with the Quake source code. 

Warning 1.  Quake was delivered with V2.00beta3

> However, sometimes the program crashes due to a return value of sbrk(0)
> of 4292927536 (I'm not sure if this value changes between
> crashes/reboots/etc).

This will only happen if you are running under Windows, and your memory
is fragmented, and it returns a block below the current arena.  Since
the original Quake shipped with unixy sbrk() this never happened.

You can probably get the right behavior by setting some crt0 flags.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019