home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!jato!llyene!thyme!kaleb
- From: kaleb@thyme.jpl.nasa.gov (Kaleb Keithley)
- Subject: Re: FLAME, FLAME ON X!!!
- Message-ID: <1992Nov19.180858.642@thyme.jpl.nasa.gov>
- Organization: Jet Propulsion Laboratory, Pasadena, CA
- References: <1992Nov16.162457.2923@osf.org> <1ebs7rINNp9k@armory.centerline.com> <1992Nov19.040434.12181@osf.org>
- Date: Thu, 19 Nov 92 18:08:58 GMT
- Lines: 37
-
- In article <1992Nov19.040434.12181@osf.org> dbrooks@osf.org (David Brooks) writes:
- >jimf@centerline.com (Jim Frost) writes:
- >
- >>Unfortunately power-of-two allocation is remarkably wasteful of
- >>virtual memory (which means wasteful of real live swap space on many
- >>systems).
- >
- >Then why have I heard people recommend using gnu malloc with X, people who
- >I thought would be in the know? The only gnu mallocs I've seen use
- >exclusively power-of-two allocation, and don't attempt to split a larger
- >block or merge blocks on free. There's even a comment:
- >
-
- But which GNU malloc? The one in emacs and gcc or their "beta" version?
- They are different! The one in emacs is very similar to the berkeley
- malloc, which is blazingly fast, but very poor at managing fragmentation
- of the malloc "arena" a.k.a. the heap. Ironically, fast but inefficient
- is probably okay for gcc, but exactly the opposite of what you want for
- emacs, an X server, or any other long running malloc-intensive application.
-
- Several vendors have very good malloc packages, and others don't. Some
- vendors provide alternative malloc packages that emphasize size over speed;
- usually you link with -lmalloc to get this one, if it's available.
-
- Early in X11R4 I ran a series of benchmarks on the MIT Sample X Server using
- some of the various mallocs publically available, two proprietary mallocs
- (people sent me their compiled binaries), plus the standard malloc that
- comes with SunOS C runtime library. The tests were not really scientific,
- so the results are by no means conclusive, but I would offer that while
- demonstrably slower, SunOS, GNU beta, and AT&T SVR4 mallocs appear to make
- more efficient use of the heap than the emacs and berkeley mallocs.
-
- --
-
- Kaleb Keithley kaleb@thyme.jpl.nasa.gov
-
- Not authorized, in any way, shape, or form, to speak for anyone.
-