delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/26/03:04:41

Date: Sat, 26 May 2001 10:04:26 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
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: <CAEGKOHJKAAFPKOCLHDIAEKECDAA.tim.van.holder@pandora.be>
Subject: Re: ehhanced realloc test program
References: <CAEGKOHJKAAFPKOCLHDIAEKECDAA DOT tim DOT van DOT holder AT pandora DOT be>
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

> From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> 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.

- Raw text -


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