Date: Sat, 26 May 2001 10:04:26 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Tim Van Holder" Message-Id: <8011-Sat26May2001100426+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: Subject: Re: ehhanced realloc test program References: Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Tim Van Holder" > Date: Fri, 25 May 2001 21:25:04 +0200 > > > > Well, I guess if you enlarge the delta to a very large number, like > > 1MB, say, it will finally have to move the data, after it gets the > > large chunk from sbrk. > > > Well, yes, but since the test program runs realloc 10000 times, > you'd end up allocating about 10GB You need to change the program, of course. With large allocations, there's no need to do it many times. > FWIW, I just tried again with "huge" increments - the first buffer > being grown by 1024, the second by 512 (in parallel). This took the > old realloc a whopping 28315 ticks, while the new one took only 185 > (with -O6; no profiling done). This test seems to be enough. > Way to go Mark! :-) Seconded.