libuvmem: usermode port of vmem(9)

The quantum cache is disabled, there is no uma.

Intent is to use this for resource allocation in bhyve(8), for start.
Addition of -luvmem to bhyve linking was done to test changes to share/mk.

Reviewed by:	bnovkov, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D27220
This commit is contained in:
Konstantin Belousov
2020-12-21 19:41:34 +02:00
parent 305e33d4c6
commit 1ecf01065b
9 changed files with 194 additions and 23 deletions
+1
View File
@@ -107,6 +107,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \
libulog \
libutil \
libutil++ \
libuvmem \
${_libvgl} \
libwrap \
libxo \
+17
View File
@@ -0,0 +1,17 @@
PACKAGE= runtime
LIB= uvmem
SRCS= subr_vmem.c
SHLIB_MAJOR= 1
LIBADD+= pthread
CFLAGS.clang+=-Wno-thread-safety-analysis
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def
.include <src.opts.mk>
.PATH: ${SRCTOP}/sys/kern
.include <bsd.lib.mk>
+15
View File
@@ -0,0 +1,15 @@
FBSD_1.9 {
vmem_add;
vmem_alloc;
vmem_create;
vmem_destroy;
vmem_free;
vmem_init;
vmem_roundup_size;
vmem_set_import;
vmem_set_limit;
vmem_set_reclaim;
vmem_size;
vmem_xalloc;
vmem_xfree;
};