libuvmem(3)

libuvmem3

Userspace general purpose resource allocator

Usage

library “libuvmem”

#include <sys/vmem.h>

Overview

The libuvmem is a general purpose resource allocator. It is a port of the kernel facility of the similar name vmem.

Refer to the description of the kernel allocator vmem(9) to get the documentation for it.

Notes

The “quantum cache” feature is not implemented for userspace, and the quantum and qcache_max arguments of the vmem_create() function are ignored.

The library internally uses malloc(3) to allocate structures tracking allocations.

The allocator is thread-safe. Locks for separate vmem's are independent between each other.

The supported flags for the vmem_xalloc() function are

  • M_NOWAIT

  • M_FIRSTFIT

  • M_BESTFIT

  • M_NEXTFIT

Releases

Unchanged in 2 releases since FreeBSD 15.1-RELEASE.

  1. 15.1–16.0

Authors

See vmem(9) for the history of the kernel allocator.

The userspace port for FreeBSD was done by Konstantin Belousov ⟨[email protected]⟩.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.