Mail Archives: djgpp/2002/02/11/06:50:40
On Mon, 11 Feb 2002, CBFalconer wrote:
> gcc 2.953.
I'm not sure -a is supported. In fact, I'm not sure -a is supported in
_any_ DJGPP port of any GCC version.
> Lots of time, see below. At least until I can get a
> detailed look inside free.
Well, I'm not sure: the 1.17 second taken by `free' is only about 20
clock ticks, so you are still pretty much on the clock granularity
level.
> I suspect free is talking back to the dpmi memory manager.
You have the source, and it should show that `free' doesn't issue any
system calls (because DJGPP programs never release any memory to the DPMI
server). So I think the calls to __dpmi_int are irrelevant to what
`free' does, it's just that your program calls some system services
elsewhere, and the profiling code catches some of these calls when it
randomly probes the EIP at each clock tick.
I think if the main loop of your program, the one that allocates and
frees objects, runs longer, the percent of time spent inside __dpmi_int
will go down (assuming it's more-or-less constant overhead during program
initialization and shut-down).
`free' calls 2 subroutines (`merge' and `b2bucket'), but they are both
inlined. I'd suggest to edit malloc.c, delete "inline" from these two
functions' declarations, and then rebuild and rerun the test program
again. Perhaps that will show that one of them takes most of the time.
- Raw text -