Path to this page:
./
devel/libarena,
Memory allocator API and implementation
Branch: pkgsrc-2019Q3,
Version: 20080221,
Package name: libarena-20080221,
Maintainer: pkgsrc-usersLibarena is a custom memory allocator interface and implementation. Four
allocators are provided: flat LIFO arena allocator, object pool allocator
and two malloc(3) wrappers: one which returns the pointers unadulterated
and one which obeys the requested, arbitrary alignment. These can be used
directly, or through their exported prototype interfaces.
Libarena is meant to provide a baseline interface so allocator's can be
stacked, and to provide a simple and well defined interface for libraries
and applications without becoming mired in features or capabilities. It is
not meant to restrict or confine what custom allocators can actually
accomplish. For instance, the included pool and arena allocators include a
suite of string utilities which aren't available in the generic exportable
interface. Note that these string utilities are built upon a generic
interface (see util.h) which can take the prototypical allocation context,
so they are also available to any 3rd party compatible allocators.
Surprisingly few malloc(3) library "replacements" or plug-in interfaces
support a context pointer argument. They're useless for many or most of
the tasks where the ability to specify an alternate malloc(3) could
actually be useful, e.g. poor man's RAII. For network daemons especially
this feature is useful; all allocations for a particular session can be
freed simply by closing the lowest-level allocator object.
Master sites: (Expand)
SHA1: e658fa68eed15604ff299c22b0b09c2d2e9339b5
RMD160: d4e6e6529759e206807fe661b594058c94f6323a
Filesize: 22.329 KB
Version history: (Expand)
- (2019-10-02) Package added to pkgsrc.se, version libarena-20080221 (created)