Path: utzoo!attcan!uunet!ingr!crossgl From: crossgl@ingr.com (Gordon Cross) Newsgroups: comp.unix.questions Subject: Re: malloc(3) vs. malloc(3x) Keywords: ultrix, 4.3-tahoe Message-ID: <3405@ingr.com> Date: 9 Jan 89 15:09:35 GMT References: <1418@leah.Albany.Edu> Reply-To: crossgl@ingr.UUCP (Gordon Cross) Organization: Intergraph Corp. Huntsville, Al Lines: 13 In article <1418@leah.Albany.Edu> rds95@leah.Albany.Edu (Robert Seals) writes: >How much can a single malloc get? And why does Ultrix have 2 kinds of >malloc, while 4.3-tahoe (the first one, I think) only has 1? The difference between malloc(3C) and malloc (3X) is speed: the latter version runs on average about 9 times faster. The algorithm used is optimized for speed at the expense of memory efficiency. If you are going to do LOTS of mallocs, the 3X version is usually preferable. -- Gordon Cross UUCP: uunet!ingr!crossgl "all opinions are 111 Westminister Way INTERNET: crossgl@ingr.com mine and not those Madison, AL 35758 MA BELL: (205) 772-7842 of my employer."