From nobody Tue Dec 9 00:28:59 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQKTl6PGKz6Jcvx for ; Tue, 09 Dec 2025 00:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQKTl3lwxz3XZ1 for ; Tue, 09 Dec 2025 00:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765240139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YOr9CmfCAS+fzEbWzLsZwBbDXmWQebHTrkXs6fxPo8Y=; b=mhXKf1NfeVb53++iJC11gB0M4cUFFypI7h8eWbxoNu/rF1SqYLNOIKdTYL3vqdp6k2/ltF iIKnwlSJ9ONZmu34+ZhtpslXBR3lT+jmihZ54fy24LgB4oC4iOicEjl2jUO5cXTfxrI+G8 WpqRKdo/eVgqIqHOqi+74K3vs99KQD/tTey4h1Zso3eJ+3k91AXpnIWZ+s+Zuuf8tNcB/j XGeMA/ftCKldvEr0uP9RvEpbzJPmVRneny3rz1W0Tl4Ta0bSnJU5yUmijuhurLtrHn/JDC QOGR3kT2IwrfB53KJGG+lqdRExm8ew6AbqohQ4QFGqcwlmb7eqvJgdC482kmUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765240139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YOr9CmfCAS+fzEbWzLsZwBbDXmWQebHTrkXs6fxPo8Y=; b=sb0YJMFOIHf2zn80O05YI5JhcBDLz8+u8NnXPdFjqAz8DDyEpxv+zD1FksfW6B/MuCUgOR LsFKJXfKCI5lIUF6U2kYktK7vI6BxnRU0ZRM3xoGuy1llEMOXCs1zw84bSkcidj2gNLLl+ kp68VFsPLqjkf15x2a6Fxic9EELDGn0p93j2EoNtQzvxvpfGqA1Kq9ZcdFWqAcWCdRYIPs iIJ0eV+SfDrFJ6RTx4esMNrdCfn5V2FSDwywwVaLqWPCNPrEcndbpt58oO4Z1Pfe1d3WWD 9iGOWafTGcxHfCMtLpH03vkA9p1sC395g6jvH9HIiHoXqfvghXrip9Xkci6TZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765240139; a=rsa-sha256; cv=none; b=HeKzJ8aqYnBKuKT0Ih4X58lq2WqaqLZEiu9sykEYwfoB4vCc1E7owbBXHveCwLhqg8V7I/ 0VV/aTsjNyJ1jUDYLH379jg7YhQdqtmVBqo49B++DMiLED7bt1IIchjXvaWf+nqiejYyRQ Lim17gwN7Cc5g7V85WnkCOXRw33sNY2bmm9p4g7T3WLDQzN0lAr02cvmkLMm1/gHfqeWIp tyS3OpV+Qw9Qv/Q1/lt2ZABPHF6pjWOrK39DY/MJt1Ifdsl4FJ4r7Yl5cH2Gg6Ws4aVQaD cNqD2Hp0c/tAgZKl00S10ihdArCSEhk+SruCOQWw48nCH+RbCtQKrYRR9l8tRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQKTl3J0gzc6x for ; Tue, 09 Dec 2025 00:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c4fa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 00:28:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7be091979260 - stable/15 - libuvmem: provide man page mostly as a pointer to vmem(9) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7be09197926008df7343861a645f4a5895377f91 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 00:28:59 +0000 Message-Id: <69376d4b.c4fa.38cdc372@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7be09197926008df7343861a645f4a5895377f91 commit 7be09197926008df7343861a645f4a5895377f91 Author: Konstantin Belousov AuthorDate: 2025-10-15 22:10:16 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-09 00:24:55 +0000 libuvmem: provide man page mostly as a pointer to vmem(9) (cherry picked from commit 7295aeaf5f5cbbbb16d4992b13b08bce09f03609) --- lib/libuvmem/Makefile | 2 ++ lib/libuvmem/libuvmem.3 | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/lib/libuvmem/Makefile b/lib/libuvmem/Makefile index 9d13eabd277c..0dae3eb77a74 100644 --- a/lib/libuvmem/Makefile +++ b/lib/libuvmem/Makefile @@ -10,6 +10,8 @@ CFLAGS.clang+=-Wno-thread-safety-analysis SYMBOL_MAPS= ${.CURDIR}/Symbol.map VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def +MAN= libuvmem.3 + .include .PATH: ${SRCTOP}/sys/kern diff --git a/lib/libuvmem/libuvmem.3 b/lib/libuvmem/libuvmem.3 new file mode 100644 index 000000000000..5fbb50ec57c2 --- /dev/null +++ b/lib/libuvmem/libuvmem.3 @@ -0,0 +1,71 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" This documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" +.Dd October 16, 2025 +.Dt LIBUVMEM 3 +.Os +.Sh NAME +.Nm libuvmem +.Nd userspace general purpose resource allocator +.Sh SYNOPSIS +.Lb libuvmem +.In sys/vmem.h +.Sh DESCRIPTION +The +.Nm +is a general purpose resource allocator. +It is a port of the kernel facility of the similar name +.Nm vmem . +.Pp +Refer to the description of the kernel allocator +.Xr vmem 9 +to get the documentation for it. +.Sh NOTES +The +.Dq quantum cache +feature is not implemented for userspace, and the +.Fa quantum +and +.Fa qcache_max +arguments of the +.Fn vmem_create +function are ignored. +.Pp +The library internally uses +.Xr malloc 3 +to allocate structures tracking allocations. +.Pp +The allocator is thread-safe. +Locks for separate +.Nm vmem's +are independent between each other. +.Pp +The supported +.Fa flags +for the +.Fn vmem_xalloc +function are +.Bl -bullet +.It +.Dv M_NOWAIT +.It +.Dv M_FIRSTFIT +.It +.Dv M_BESTFIT +.It +.Dv M_NEXTFIT +.El +.Sh AUTHORS +See +.Xr vmem 9 +for the history of the kernel allocator. +.Pp +The userspace port for +.Fx +was done by +.An Konstantin Belousov Aq Mt kib@FreeBSD.org .