Page MenuHomeFreeBSD

D41660.id126762.diff
No OneTemporary

D41660.id126762.diff

diff --git a/lib/libc/stdlib/malloc/Makefile.inc b/lib/libc/stdlib/malloc/Makefile.inc
--- a/lib/libc/stdlib/malloc/Makefile.inc
+++ b/lib/libc/stdlib/malloc/Makefile.inc
@@ -1,3 +1,3 @@
SYM_MAPS+=${LIBC_SRCTOP}/stdlib/malloc/Symbol.map
-.include "${LIBC_SRCTOP}/stdlib/malloc/jemalloc/Makefile.inc"
+.include "${LIBC_SRCTOP}/stdlib/malloc/${OPT_LIBC_MALLOC}/Makefile.inc"
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -228,6 +228,11 @@
LOADER_VERIEXEC_VECTX/LOADER_VERIEXEC \
VERIEXEC/BEARSSL \
+__SINGLE_OPTIONS = \
+ LIBC_MALLOC
+
+__LIBC_MALLOC_OPTIONS= jemalloc
+
# MK_*_SUPPORT options which default to "yes" unless their corresponding
# MK_* variable is set to "no".
#
diff --git a/tools/build/options/LIBC_MALLOC b/tools/build/options/LIBC_MALLOC
new file mode 100644
--- /dev/null
+++ b/tools/build/options/LIBC_MALLOC
@@ -0,0 +1,13 @@
+Specify the
+.Xr malloc 3
+implementaiton used by libc.
+The default value is
+.Li jemalloc .
+Valid values are:
+.Bl -tag -width indent
+.It Li jemalloc
+.El
+.Pp
+Other implementations are expected in the future in both
+.Fx
+and downstream consumers.

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 25, 11:03 AM (10 m, 6 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24171052
Default Alt Text
D41660.id126762.diff (1 KB)

Event Timeline