Mail Archives: djgpp/2002/02/09/08:02:07
> From: CBFalconer <cbfalconer AT yahoo DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Sat, 09 Feb 2002 12:07:01 GMT
> >
> > A patch to the code would be preferred; or at least a profiling of
> > the behavior to identify the locations where the time is spent.
> > It sounds like some nasty o(n**2) or o(n**3) algorithm issue.
> >
> > Everyone on the development team has a long list of things they
> > are working on - so unless someone adopts the problem or someone
> > provides a patch, it's likely to remain slow.
>
> I scanned quickly through djlsr203.zip without seeing anything
> meaningful to me. I am not in the least familiar with the
> runtime.
The source of malloc and free is in the library on file
src/libc/ansi/stdlib/malloc.c. To begin investigating the slowness,
I'd suggest to copy that file into some directory, build a program
with -pg, and then run it and look at the profile. The program in
which you saw the slow free operation sounds like a good testbed for
this. The tricky part is to find a program whose run time is
dominated by the malloc/free code, and make sure the run time is at
least several seconds, so that the 54-msec granularity of the DOS
clock doesn't matter.
- Raw text -