delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
From: | "John" <John DOT Portal AT btinternet DOT com> |
Newsgroups: | comp.lang.c,comp.os.msdos.djgpp,comp.compilers.lcc |
Subject: | Re: hash library - interface criticisms |
Date: | Sun, 20 Jan 2002 19:22:17 -0000 |
Lines: | 31 |
Message-ID: | <a2f5c3$10q5s6$1@ID-97861.news.dfncis.de> |
References: | <3C4ADB8E DOT 552CAE40 AT yahoo DOT com> <a2esv3$10teia$1 AT ID-97861 DOT news DOT dfncis DOT de> <3C4B0ED1 DOT 3F274F98 AT is DOT elta DOT co DOT il> |
NNTP-Posting-Host: | host213-122-193-76.btinternet.com (213.122.193.76) |
X-Trace: | fu-berlin.de 1011554500 34412422 213.122.193.76 (16 [97861]) |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.50.4807.1700 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4807.1700 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
"Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> wrote in message news:3C4B0ED1 DOT 3F274F98 AT is DOT elta DOT co DOT il... > John wrote: > > > > To free the same 500,000 nodes it takes 9,236ms, and the > > code in this case is only walking through the list and calling free(). > > I think the DJGPP implementation of malloc is optimized for allocations more > than deallocations. But you can easily see where're the hot spots if you > compile malloc.c from the library with -pg, link with -pg, and then profile > the test program. That's the beauty of Free Software: the sources are > freely available to study and scrutinize. > > I have no idea what does lcc use in its library. It uses crt.dll as default but one can link with msvcrt.lib and use msvcrt.dll instead. > Btw, a program should not need to free its heap before it exits. The OS > will take care about it. That's true, but one's programme may need to free these allocations multiple times whilst running. John
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |