delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/25/19:30:17

From: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: negative sbrk(0)
Date: Mon, 25 Sep 2000 18:11:19
Organization: Aspen Technology, Inc.
Lines: 10
Message-ID: <39cf9547.sandmann@clio.rice.edu>
References: <8qns3d$6g4$1 AT diana DOT bcn DOT ttd DOT net>
NNTP-Posting-Host: dcloan.hou.aspentech.com
X-Trace: selma.aspentech.com 969923609 15091 10.32.115.107 (25 Sep 2000 23:13:29 GMT)
X-Complaints-To: postmaster AT aspentech DOT com
NNTP-Posting-Date: 25 Sep 2000 23:13:29 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

> Well, I have got sbrk(0) to return negative values in some cases, so the
> function tells I have -1950Kb.

Let me guess, you are running under Windows.  Well, it sometimes returns
memory blocks all over the virtual address space in no particular order.

> Anybody has a solution?

If you expect sbrk() return values to be anything other than a random
address,  you should set the unixy_sbrk flag in the crt0 flags.

- Raw text -


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