From: Laurence Withers Newsgroups: comp.os.msdos.djgpp Subject: sbrk(0) return value Date: Sun, 13 Feb 2000 13:40:07 +0000 Organization: . Message-ID: NNTP-Posting-Host: lwithers.demon.co.uk X-NNTP-Posting-Host: lwithers.demon.co.uk:194.222.80.1 X-Trace: news.demon.co.uk 950449295 nnrp-12:18974 NO-IDENT lwithers.demon.co.uk:194.222.80.1 X-Complaints-To: abuse AT demon DOT net MIME-Version: 1.0 X-Newsreader: Turnpike Integrated Version 4.02 S Lines: 21 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, I'm currently playing around with the Quake source code. At the beginning of the program, Quake pages itself in and does some other things with memory (not sure what...). Somewhere along the line, this process involves calling sbrk(0), which I interpret as finding out how big the "image" is (this is what Quake pages in). 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). Is this likely to be a programming error, or does sbrk(0) sometimes return a high value like this? My system is Win98 w/64Mb RAM and a PII chip. Thanks for your time + help, and bye for now, -- Laurence Withers, lwithers AT lwithers DOT demon DOT co DOT uk http://www.lwithers.demon.co.uk/