mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-23 11:16:33 +00:00
libc: add LIBC_MALLOC option
This will enable alternative mallocs to be included in the tree and selected by setting LIBC_MALLOC. As there is only one today (jemalloc) this option does nothing, but we expect to add other implementations in the future. This will also reduce diffs to CheriBSD. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41660
This commit is contained in:
parent
bd016ad227
commit
09e32b2fdd
|
@ -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"
|
||||
|
|
|
@ -228,6 +228,12 @@ __DEFAULT_DEPENDENT_OPTIONS= \
|
|||
LOADER_VERIEXEC_VECTX/LOADER_VERIEXEC \
|
||||
VERIEXEC/BEARSSL \
|
||||
|
||||
__SINGLE_OPTIONS = \
|
||||
LIBC_MALLOC
|
||||
|
||||
__LIBC_MALLOC_OPTIONS= jemalloc
|
||||
__LIBC_MALLOC_DEFAULT= jemalloc
|
||||
|
||||
# MK_*_SUPPORT options which default to "yes" unless their corresponding
|
||||
# MK_* variable is set to "no".
|
||||
#
|
||||
|
|
13
tools/build/options/LIBC_MALLOC
Normal file
13
tools/build/options/LIBC_MALLOC
Normal file
|
@ -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.
|
Loading…
Reference in a new issue