Mail Archives: djgpp-workers/2001/05/26/03:04:41
> 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 -