summaryrefslogtreecommitdiff
path: root/libhurd-slab/README
blob: 4d6e6d4f3f2ceb65d83ef6072345afd04d3f88d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Slab Allocator
==============

If a program requires many objects of the same type, which are created
and destroyed often, then it can be better to not use a general
purpose allocation strategy like malloc(), but a special arena (or
other backing memory) and a special purpose allocator that can take
advantage of the fact that all objects are of the same size.

In addition, such objects usually have an initial stage that is
naturally returned to when the object is not needed anymore.  For
example locks are unlocked, reference counters are zero, etc.  In such
a situation, performance can be further increased by caching the
unused objects, instead of destroying them.

The following article gives more information about such caching object
allocators:

http://citeseer.nj.nec.com/bonwick94slab.html

The current implementation in libhurd-slab was written by Johan
Rydberg, <jrydberg@night.trouble.net>.


Copyright 2003 Free Software Foundation, Inc.
Written by Marcus Brinkmann <marcus@gnu.org>

This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
modifications, as long as this notice is preserved.
 
This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.