X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <4046F311.D6455EA1@yahoo.com> From: CBFalconer 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 wrote: > >> This is why I wrote nmalloc, which may some day appear in DJGPP >> 2.04. It is missing the memalign operation. Available at: >> >> >> >> 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. USE worldnet address!