----------
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 <slf@connect.com.au> 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

<BASE HREF="http://www.cs.colorado.edu/~zorn/Malloc.html">

<html>
<head>
<title>Malloc/Free Implementations</title>
</title>
</head>
<body>
<h1 align=center>Malloc/Free and GC Implementations</h1>

<p>
This list is maintained by <a href="Home.html">Ben Zorn</a>.  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
<a href="mailto:zorn@cs.colorado.edu">zorn@cs.colorado.edu</a>

<hr>
<h3> There is further information on the following topics:</h3>
<ul>
<li> <a href="#bwgc">Boehm-Weiser Conservative Garbage Collector
</a>
<li> <a href="#bsd"> BSD Malloc
</a>
<li> <a href="#csrimalloc"> CSRI UToronto Malloc
</a>
<li> <a href="#gnumalloc"> GNU Malloc
</a>
<li> <a href="#gppmalloc"> G++ Malloc
</a>
<li> <a href="#mmalloc"> mmalloc (the GNU memory-mapped malloc package)
</a>
<li> <a href="#quickfit">  QuickFit Malloc
</a>
<li> <a href="#vmalloc">  Vmalloc (by Kiem-Phong Vo)
</a>
</ul>

<a name=bwgc>
<hr>

<h2> Boehm-Weiser Conservative Garbage Collector 
</h2>

<p> 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.

<p> <em>Contact Person</em>: Hans Boehm (<a href="mailto:boehm@mti.sgi.com">boehm@mti.sgi.com</a>)
<p> <em>WWW Site:</em> <a href="http://reality.sgi.com/employees/boehm_mti/gc.html">http://reality.sgi.com/employees/boehm_mti/gc.html</a>

<a name=bsd>
<hr>

<h2> BSD Malloc
</h2>

<p> 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.


<p> <em>Contact Person</em>: none
<p> <em>WWW Site</em>:
<a href="http://www.plaza.hitachi-sk.co.jp/ftp/FreeBSD/FreeBSD-stable/src/lib/libc/stdlib/malloc.c">
http://www.plaza.hitachi-sk.co.jp/ftp/FreeBSD/FreeBSD-stable/src/lib/libc/stdlib/malloc.c</a>

<a name=csrimalloc>
<hr>

<h2>CSRI UToronto Malloc</h2>

<p>An ANSI C <code>malloc/realloc/free</code> implementation.  (It also
supports BSD/Sun <code>valloc/memalign</code>, 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
<code>free()</code>, 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 <code>xmem</code> 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 <code>sbrk()</code>
system call.

<p><em><em>Contact Person</em></em>: Mark Moraes
(<a href="http://www.cs.toronto.edu/~moraes/">moraes@deshaw.com</a>)

<p><em>FTP Site</em>: /anonymous@ftp.cs.toronto.edu:/pub/moraes/malloc.tar.gz
<a href="ftp://ftp.cs.toronto.edu/pub/moraes/malloc.tar.gz">(GET-IT)</a>

<a name=gnumalloc>
<hr>

<h2> GNU Malloc
</h2>

<p> 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.

<p><em>Contact Person</em>: Mike Haertel (<a href="mailto:haertel@ichips.intel.com">haertel@ichips.intel.com</a>)

<p><em>FTP Site</em>: /anonymous@ftp.cs.colorado.edu/pub/misc/malloc-implementations/malloc.tar.gz <a href="ftp://ftp.cs.colorado.edu/pub/misc/malloc-implementations"> (GET-IT)</a>

<a name=gppmalloc>
<hr>

<h2> G++ Malloc
</h2>

<p> 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.

<p><em>Contact Person</em> : Doug Lea (<a href="mailto:dl@oswego.edu">dl@oswego.edu</a>)

<p><em>FTP Site</em>: /anonymous@g.oswego.edu:/pub/misc/malloc-*.c <a href="ftp://g.oswego.edu/pub/misc"> (GET-IT)</a>

<a name=mmalloc>
<hr>

<h2> Mmalloc
</h2>

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

<p><em>Contact Person</em> : Fred Fish (Cygnus Support) and
Mike Haertel (Free Software Foundation)

<p><em>WWW Site (documentation only)</em>: <a href="http://www.sdsu.edu/doc/texi/mmalloc_toc.html">http://www.sdsu.edu/doc/texi/mmalloc_toc.html</a>

<hr>

<a name=quickfit>
<h2> QuickFit Malloc
</h2>

<p> 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).

<p><em>Contact Person</em>: Dirk Grunwald (<a href="mailto:grunwald@cs.colorado.edu">grunwald@cs.colorado.edu</a>)

<p><em>FTP Site</em>: /anonymous@ftp.cs.colorado.edu:pub/cs/misc/qf.c <a href="ftp://ftp.cs.colorado.edu/pub/misc/qf.c"> (GET-IT)</a>

<hr>

<a name=vmalloc>
<h2> Vmalloc
</h2>

<p> 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 ``<a
href="http://portal.research.bell-labs.com/orgs/ssr/book/reuse/license/packages/95/vmalloc.html">Practical
Reusable UNIX Software</a>'' edited by Balachander Krishnamurthy John
Wiley & Sons, 1995

<p><em>Contact Person</em>: Kiem-Phong Vo (<a href="mailto:kpv@research.att.com">kpv@research.att.com</a>)

<p><em>WWW Site</em>: <a href="http://portal.research.bell-labs.com/orgs/ssr/book/reuse/license/packages/95/vmalloc.html">http://portal.research.bell-labs.com/orgs/ssr/book/reuse/license/packages/95/vmalloc.html</a>

<hr>
<address>This page is maintained by <a href="Home.html">Ben Zorn</a> (<a href="mailto:zorn@cs.colorado.edu">zorn@cs.colorado.edu</a>)
</address>
</body>
</html>