BSD Ports

devel/libarena 20080221 NetBSD

Memory allocator API and implementation

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
Last update
Commit
e282cfb26b
Categories
devel
Package size
23.0 KiB, 100.3 KiB installed

Description

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

In the other systems

SystemPortVersion
NetBSDdevel/libarena20080221
FreeBSDdevel/libarena0.3.7
DragonFlydevel/libarena0.3.7
HardenedBSDdevel/libarena0.3.7
GhostBSDdevel/libarena0.3.7

Install

Binary package:

pkgin install libarena

From pkgsrc:

cd /usr/pkgsrc/devel/libarena && make install clean

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_6420080221
NetBSD 10.1 aarch6420080221
SmartOS / illumos x86_6420080221
macOS 15 arm6420080221

Dependencies

No port depends on this one.

Commit history 1

DateCommitCreditsLog message
e282cfb26b wiz *: add LDFLAGS overide that was previously in mk
This is a workaround and should be fixed properly per-package - they should use the pkgsrc LDFLAGS, but this restores what happened before the mk/ cleanup. Fixes relro build for packages that do not honor LDFLAGS. Package list provided by mef@, thanks! Workaround commit requested by bsiegert on tech-pkg.