Mail Archives: djgpp-workers/2007/12/06/04:27:07
cbfalconer AT maineline DOT net kirjoitti:
> Andris Pavenis wrote:
>
>> There seem to be serious performance problems in GCC-4.3 for DJGPP
>> due to slowness of free() call especially for Ada compiler.
>>
>> Tried to bootstrap gcc-4.3-20071130 for DJGPP (after reverting some
>> earlier changes in libiberty/configure.ac present in snapshot).
>> Initially thought that compiler (gnat1.exe) has went into some
>> infinite loop when compiling gcc/ada/ali.adb for stage2.
>>
>> Found that extremly long time is being spent in libibrty/hashtab.c
>> in procedure htab_delete() which in that case uses free() to
>> release several millions allocated memory block. htab_delete()
>> took perhaps about 30 minutes on Intel Core 2 Quad 2.4GHz processor
>> (I did not measure accuratelly). There is of course not much use of
>> 4 processor cores as DJGPP cannot use them all.
>>
>
> This sounds like the O(n) free is biting. This is solved (O(1)) in
> nmalloc for DJGPP, available on my page at:
>
> <http://cbfalconer.home.att.net/download/nmalloc.zip>
>
> The version in that file has a terminal section, useless, for
> allocating large aligned blocks. The debuggery possibilities, and
> linkage, are all done and in the manual.
>
Thanks. I tried it with my test example. Speed seems to be OK. There
seems however to be unstability under WinXP (when I run example from
bash, it randomly crashes and jumps out of bash without any error
message). That is worst style of crashing for DJGPP as also GDB will not
help much.
I used DJGPP v2.04 development version, gcc-4.2.2, etc.
I'll perhaps look whether I can get it compile under Linux (but I must
use gcc -m32 as the default 64 bit mode is not OK as far as I
understood). Under Linux I could use valgrind which is unfortunatelly
not available for DJGPP.
Andris
- Raw text -