delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/03/04/05:16:54

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <4046F311.D6455EA1@yahoo.com>
From: CBFalconer <cbfalconer AT yahoo DOT com>
Organization: Ched Research
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Speed of free()
References: <40457b5c DOT 5675949 AT localhost> <4045C364 DOT 41EFB535 AT yahoo DOT com> <40469645 DOT 78111865 AT localhost>
Lines: 32
Date: Thu, 04 Mar 2004 10:08:06 GMT
NNTP-Posting-Host: 12.76.143.37
X-Complaints-To: abuse AT worldnet DOT att DOT net
X-Trace: bgtnsc05-news.ops.worldnet.att.net 1078394886 12.76.143.37 (Thu, 04 Mar 2004 10:08:06 GMT)
NNTP-Posting-Date: Thu, 04 Mar 2004 10:08:06 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Scott wrote:
> CBFalconer <cbfalconer AT yahoo DOT com> wrote:
> 
>> This is why I wrote nmalloc, which may some day appear in DJGPP
>> 2.04.  It is missing the memalign operation.  Available at:
>>
>>   <http://cbfalconer.home.att.net/download/nmalloc.zip>
>>
>> and it makes that free operation O(N) instead of O(N*N), by making
>> the individual free operations O(1).
> 
> That's pretty sweet!
> 
> I find it disturbing that going from 2.01 to 2.03 brought such a
> serious performance penalty.  I really hope that it gets fixed in
> 2.04, one way or another.

I don't think it did (2.01 to 2.03), but I could be wrong there. 
I think it is just that most programs don't free 100k+ separate
allocations at once.  I did, so I noticed the problem and tracked
it down.  At the time I found that lcc-win32 and VC6 had the same
problem.

AFAICT you can use the revised malloc anywhere except some things
to do with porting gcc, where the memalign stuff is needed.

-- 
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net)
   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!


- Raw text -


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