delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2007/12/06/04:27:07

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Message-ID: <4757AF98.3020207@iki.fi>
Date: Thu, 06 Dec 2007 10:15:20 +0200
From: Andris Pavenis <andris DOT pavenis AT iki DOT fi>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
CC: cbfalconer AT maineline DOT net
Subject: Re: gcc-4.3. snapshots and DJGPP memory allocator efficiency
References: <120620070243 DOT 12426 DOT 475761D4000619850000308A22230682229B0A02D29B9B0EBF9D0A02010C040E000D0C AT att DOT net>
In-Reply-To: <120620070243.12426.475761D4000619850000308A22230682229B0A02D29B9B0EBF9D0A02010C040E000D0C@att.net>
Reply-To: djgpp-workers AT delorie DOT com

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 -


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