Fixup fromcvs/togit conversion
[pkgsrcv2.git] / devel / libarena / DESCR
1 Libarena is a custom memory allocator interface and implementation. Four
2 allocators are provided: flat LIFO arena allocator, object pool allocator
3 and two malloc(3) wrappers: one which returns the pointers unadulterated
4 and one which obeys the requested, arbitrary alignment. These can be used
5 directly, or through their exported prototype interfaces.
6
7 Libarena is meant to provide a baseline interface so allocator's can be
8 stacked, and to provide a simple and well defined interface for libraries
9 and applications without becoming mired in features or capabilities. It is
10 not meant to restrict or confine what custom allocators can actually
11 accomplish. For instance, the included pool and arena allocators include a
12 suite of string utilities which aren't available in the generic exportable
13 interface. Note that these string utilities are built upon a generic
14 interface (see util.h) which can take the prototypical allocation context,
15 so they are also available to any 3rd party compatible allocators.
16
17 Surprisingly few malloc(3) library "replacements" or plug-in interfaces
18 support a context pointer argument. They're useless for many or most of
19 the tasks where the ability to specify an alternate malloc(3) could
20 actually be useful, e.g. poor man's RAII. For network daemons especially
21 this feature is useful; all allocations for a particular session can be
22 freed simply by closing the lowest-level allocator object.