X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f Message-ID: <3C7967F6.D063DCD4@yahoo.com> Date: Sun, 24 Feb 2002 17:23:50 -0500 From: CBFalconer 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: <10202201713 DOT AA23034 AT clio DOT rice DOT edu> <3C7919F2 DOT 96FFA97D AT yahoo DOT com> <200202241740 DOT g1OHeOd19302 AT envy DOT delorie DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com DJ Delorie wrote: > > > This could all be cured by a semi-portable implementation of, say, > > "fakesbrk" which will return a repeatable set of addresses under > > the same circumstances. It might actually malloc a large block > > which contains those addresses to be faked. But how can it ensure > > that a certain range is available to any degree of certainty, or > > even of probability? > > Put a huge uninitialized static array in your program and use it for > sbrk. It will always be in the same virtual address. Sounds good. Won't that also be link order and main program declaration sensitive, though? Since all this is system specific I guess there is no need for it to port over systems, but that would be nice. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net) Available for consulting/temporary embedded and systems. (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce AT ftc DOT gov (for spambots to harvest)