From nobody Tue Dec 2 03:41:55 2025 X-Original-To: dev-commits-src-all@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 4dL65b5gKXz6JTxW for ; Tue, 02 Dec 2025 03:41:55 +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 4dL65b2jm9z44F9 for ; Tue, 02 Dec 2025 03:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764646915; 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=Qk/GnAsEPw/LBgcW7usvH6UhYodp0RR37FtijwVpEX8=; b=uWfRvmETs1OzmMPipwPJ2u5eLGrM5CxWNxuduQollX7bpW5ryyrK1VZYmjaaBs8eaKbM9a bZHzYIWV7naCam3kQZ8DYF3BsjeRUaCnfYk2LbncnwI0CiJKNKA0U0aRQbbQQ/5nlpZR4G g1+tsoCRXSUahpnsPtFb1sVmH2atDCd/bmzM8UjroKcD6A+6rIo37zVk/fQdXpnibHRLio Z4JrgrHBxzucQyphO0DMpKtqDcXcUPsbK6dH1xOvviUvxvybrXN37VqA3h0vTWwg3VHkwQ 5VDdltLdYFM9uR+G1+v47guJ3J6fc7BvPMvhm8yGDCUEZJIsyN2wxdeTJ50FIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764646915; 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=Qk/GnAsEPw/LBgcW7usvH6UhYodp0RR37FtijwVpEX8=; b=pZWxYRv2AypdQSG7SlfydrGULpmTzaCNjq2Xo8yEt9WBosCAo+T8gRke6dSraQ5ZZPzW+K M1ft6/Owpnuhe/gQBVjdw3nbekyIe/NMu6WfnNhrQXsM04/dRCIquLu1ssG7Fqzw8Y27k/ 4xvXVtleKjx8w7jiCz/1ujqihbX7Y1UzIYTUgH/pGrjiuz7qlr5U24gds8CHgBg5U8anOf e6MNjggV8YdCr2j0rEHR74bmR9PVUAKyLQECipqeBgWr972yHLu+IMm51q3cNwK27x3vwc 8W0N7bVR7MC2GPRJWG7U2au9h+U2LITSTZsRRkgZ3upbPFRtnJQzwW4oCazs0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764646915; a=rsa-sha256; cv=none; b=TaqopjknQm88JB4rmkGShktrxns0s0m8GP9ejsAEAa/wgYas9mXzSMAh6C1iD4XSiYK7Xe jG1Z7ojMa380gwakEY9A3rNfIkmDvjrLxRBoWzJxvZU167pbFU7LS7yf0cocbF+Hvx0y64 nYOx+f9wZSTt1rSOFG5tgtGs0GUh9aLieYu1CGicTAZZW26H2hhfrtTTPlXP35MjkJhwmq gVPSZQoQoujrSmhyuRdVPci9CRCrESD2EhH/w4ctXaylk8LtxPaboEQuq9nyT7fH7p9dOT Y5A1DIwJ1DtZRtqbY87oDUfsKqR8P4yybEMwnN5js1Vr1uG2PJH+wYN64rsxAA== 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 4dL65b22QGzqp0 for ; Tue, 02 Dec 2025 03:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3225e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 02 Dec 2025 03:41:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7295aeaf5f5c - main - libuvmem: provide man page mostly as a pointer to vmem(9) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 7295aeaf5f5cbbbb16d4992b13b08bce09f03609 Auto-Submitted: auto-generated Date: Tue, 02 Dec 2025 03:41:55 +0000 Message-Id: <692e6003.3225e.38bd67fc@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7295aeaf5f5cbbbb16d4992b13b08bce09f03609 commit 7295aeaf5f5cbbbb16d4992b13b08bce09f03609 Author: Konstantin Belousov AuthorDate: 2025-10-15 22:10:16 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-02 03:41:13 +0000 libuvmem: provide man page mostly as a pointer to vmem(9) Reviewed by: bnovkov, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27220 --- 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 .