---------- X-Sun-Data-Type: text X-Sun-Data-Description: text X-Sun-Data-Name: text X-Sun-Charset: us-ascii X-Sun-Content-Lines: 25 Stewart Forster wrote: > Basically you want a malloc library that does 3 things: > >1) Groups like-sized malloc requests together on a single VM page >2) Separates the allocataion meta-data from the allocated space onto separate > VM pages. >3) Ensures all new allocations happen as low down in the VM space as possible, > so when load drops off on squid, allocated pages that aren't needed anymore > can get paged out. > > The malloc library we used is not available publically but I understand >there are malloc libraries out there which will do the same sorts of things. > > Stew. There is a list of free Malloc implementations available at http://www.cs.colorado.edu/~zorn/Malloc.html Perhaps what we're looking for is in there? -- KH ---------- X-Sun-Data-Type: html Content-Disposition: inline; filename="Malloc.html" Content-Base: "http://www.cs.colorado.edu/~zorn/Mallo c.html" X-Sun-Content-Length: 7156 X-Sun-Charset: us-ascii X-Sun-Content-Lines: 191 Malloc/Free Implementations

Malloc/Free and GC Implementations

This list is maintained by Ben Zorn. This list is not intended to be comprehensive, however I am happy to add missing entries when I am made aware of them. If you have additional implementations that I should note here, please send email to zorn@cs.colorado.edu

There is further information on the following topics:

Boehm-Weiser Conservative Garbage Collector

A garbage collecting storage allocator that is intended to be used as a plug-in replacement for C's malloc. Since the collector does not require pointers to be tagged, it does not attempt to ensure that all inaccessible storage is reclaimed. However, in our experience, it is typically more successful at reclaiming unused memory than most C programs using explicit deallocation. Unlike manually introduced leaks, the amount of unreclaimed memory typically stays bounded. This implementation has been ported to many architectures and operating systems.

Contact Person: Hans Boehm (boehm@mti.sgi.com)

WWW Site: http://reality.sgi.com/employees/boehm_mti/gc.html

BSD Malloc

Chris Kingsley implemented this very fast segregated-storage algorithm that was distributed with the 4.2 BSD Unix release. This algorithm allocates objects in a limited number of different size classes, namely powers of two minus a constant. Allocation requests are rounded up to the nearest size class and a free list of objects of each size class is maintained. If no objects of a particular size class are available, more storage is allocated. No attempt is made to coalesce objects. The source code version pointed to is part of the FreeBSD release.

Contact Person: none

WWW Site: http://www.plaza.hitachi-sk.co.jp/ftp/FreeBSD/FreeBSD-stable/src/lib/libc/stdlib/malloc.c

CSRI UToronto Malloc

An ANSI C malloc/realloc/free implementation. (It also supports BSD/Sun valloc/memalign, so it can be compiled into X servers) The algorithm is first-fit with boundary-tags for free-space coalescing; it reduces fragmentation by using multiple free-lists of different sizes, each with its own roving pointer. It can be compiled in a debugging version that does comprehensive and paranoid error-checking, enough to detect most forms of heap corruption. (Blocks accessed after free(), writing past the end of a block). It also has portable support for tracing, memory leak detection and allocation statistics. Comes with an X tool xmem for viewing traces to get a visual idea of the memory allocation patterns of a program. On Suns (and possibly on System V Release 4 machines), it can use a memory-mapped file for the heap, instead of using the sbrk() system call.

Contact Person: Mark Moraes (moraes@deshaw.com)

FTP Site: /anonymous@ftp.cs.toronto.edu:/pub/moraes/malloc.tar.gz (GET-IT)

GNU Malloc

A variant hybrid first-fit/segregated algorithm written by Mike Haertel. It is an ancestor/sibling of the malloc used in GNU libc, but is smaller and faster than the GNU version.

Contact Person: Mike Haertel (haertel@ichips.intel.com)

FTP Site: /anonymous@ftp.cs.colorado.edu/pub/misc/malloc-implementations/malloc.tar.gz (GET-IT)

G++ Malloc

Version 2.6.2 of an enhancement to the first-fit roving pointer algorithm using bins of different sizes. It is distributed with the GNU C++ library, libg++ (through version 2.4.5) and is also available separately.

Contact Person : Doug Lea (dl@oswego.edu)

FTP Site: /anonymous@g.oswego.edu:/pub/misc/malloc-*.c (GET-IT)


A memory-mapped implementation of the GNU malloc package which uses mmap as the mechanism for obtaining more memory (instead of sbrk).

Contact Person : Fred Fish (Cygnus Support) and Mike Haertel (Free Software Foundation)

WWW Site (documentation only): http://www.sdsu.edu/doc/texi/mmalloc_toc.html

QuickFit Malloc

An implementation of Weinstock and Wulf's fast segregated-storage algorithm based on an array of freelists. Like the GNU algorithm, QuickFit is a hybrid algorithm that allocates small and large objects in different ways. Large objects are handled by a general algorithm (in this case, the G++ allocator).

Contact Person: Dirk Grunwald (grunwald@cs.colorado.edu)

FTP Site: /anonymous@ftp.cs.colorado.edu:pub/cs/misc/qf.c (GET-IT)


A portable library for dynamic memory allocation. It provides a set of functions to create and allocate from different regions of memory. Each region can be managed using different algorithms for obtaining raw storage and parceling the storage out in blocks. The software is available as part of the book ``Practical Reusable UNIX Software'' edited by Balachander Krishnamurthy John Wiley & Sons, 1995

Contact Person: Kiem-Phong Vo (kpv@research.att.com)

WWW Site: http://portal.research.bell-labs.com/orgs/ssr/book/reuse/license/packages/95/vmalloc.html

This page is maintained by Ben Zorn (zorn@cs.colorado.edu)