www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/16/19:04:38

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Message-ID: <3CE41DBB.B1DB75C4@yahoo.com>
Date: Thu, 16 May 2002 16:59:39 -0400
From: CBFalconer <cbfalconer AT yahoo DOT com>
Organization: Ched Research
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Malloc/free DJGPP code
References: <10204222312 DOT AA16592 AT clio DOT rice DOT edu> <3CE37BCA DOT F5DE2858 AT yahoo DOT com> <557-Thu16May2002145925+0300-eliz AT is DOT elta DOT co DOT il> <3CE3D4EE DOT 5DBF820B AT yahoo DOT com> <4839-Thu16May2002215006+0300-eliz AT is DOT elta DOT co DOT il>
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii wrote:
> 
> > Date: Thu, 16 May 2002 11:49:02 -0400
> > From: CBFalconer <cbfalconer AT yahoo DOT com>
> > >
> > > Our sbrk cannot return memory to the system, so no problems can ever
> > > arise out of that ;-)
> >
> > It cannot be told to supply a negative increment, thus reducing
> > the portion supplied (question, not statement)?
> 
> The DJGPP implementation of sbrk does accept a negative argument, but
> it doesn't return that memory to the system.

So, what does it do with that memory.  Is it simply abandoned? 
What does it do if the argument is the negative of the total size
allocated continuously so far?  What if the negative argument is
larger magnitude that what has been allocated?  What happens on a
subsequent call for a normal positive size?  If these things can
foul it up nmalloc should protect against generating such calls
with oversized requests.  Maybe it could limit allocation requests
to INT_MAX after rounding up.


-- 
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net)
   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!


- Raw text -


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