From nobody Fri Sep 01 17:13:21 2023 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 4Rcl3z5g0qz4rp3P for ; Fri, 1 Sep 2023 17:13:35 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rcl3z40Wpz3bPJ for ; Fri, 1 Sep 2023 17:13:35 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-31ad9155414so1803247f8f.3 for ; Fri, 01 Sep 2023 10:13:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693588413; x=1694193213; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OpUzCYq90kAO5SgIEHlAw/kbMr7s0E49n7G1lC/MxWQ=; b=GKw8I4N7CylIkDDLTqx/+ZN6T9JGbewktE0vuehVLquEF5FQwT+IchvGyjhkU22QlU y5aW40TfqMd6+pciz2eOmoLBueyzzOeu37Nnfa3hwnb7A9VxMO0K4be4LqGn70UiFOD3 9YvzC8Ue8sb8wDGk02L0JArS0RPwdhM3EV5KhALEHF5dUcvpiIrr4bjW/b7xqSlGAmst 1g3BpdCUADuSYhygPUO/ic4+jtXK4xrzpd7nb+KJLrdTSpcaESu7xbLXLBHzxVVg7g9O Apo2jJE0ZsYeRX5ZyFX16X7Bb7yinOA+oUz6CeIJOJGf/DPSuv3YMXNkNXq/TSYOD62p /MhQ== X-Gm-Message-State: AOJu0Yym6HTH43tluV7qL5WDkz+AYqAOFT7Uel+gfr7rbscJn6jtKENg c+sh7P5yv5nluMDnmuIf790/2A== X-Google-Smtp-Source: AGHT+IGQeAXHADrZelAXUjsGpqLTePI6t+FX3on9sc+P9GYII9KIKQKBDZ7+2pPULCCkLcq53qgJxg== X-Received: by 2002:adf:f987:0:b0:319:76a3:1006 with SMTP id f7-20020adff987000000b0031976a31006mr2155784wrr.40.1693588412953; Fri, 01 Sep 2023 10:13:32 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id i14-20020adfdece000000b003142e438e8csm5772629wrn.26.2023.09.01.10.13.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2023 10:13:32 -0700 (PDT) Content-Type: text/plain; charset=us-ascii 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 09e32b2fddf5 - main - libc: add LIBC_MALLOC option From: Jessica Clarke In-Reply-To: <202309011654.381Gsuaf070723@gitrepo.freebsd.org> Date: Fri, 1 Sep 2023 18:13:21 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <8D44A65D-373D-49E5-96D0-208F77C5A402@freebsd.org> References: <202309011654.381Gsuaf070723@gitrepo.freebsd.org> To: Brooks Davis X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Rcl3z40Wpz3bPJ On 1 Sep 2023, at 17:54, Brooks Davis wrote: >=20 > The branch main has been updated by brooks: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D09e32b2fddf5f673f76e2fffa415a73d= 99a6f309 >=20 > commit 09e32b2fddf5f673f76e2fffa415a73d99a6f309 > Author: Brooks Davis > AuthorDate: 2023-09-01 16:42:39 +0000 > Commit: Brooks Davis > CommitDate: 2023-09-01 16:54:23 +0000 >=20 > libc: add LIBC_MALLOC option >=20 > 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. >=20 > Reviewed by: emaste > Differential Revision: https://reviews.freebsd.org/D41660 > --- > lib/libc/stdlib/malloc/Makefile.inc | 2 +- > share/mk/src.opts.mk | 6 ++++++ > tools/build/options/LIBC_MALLOC | 13 +++++++++++++ > 3 files changed, 20 insertions(+), 1 deletion(-) >=20 > diff --git a/lib/libc/stdlib/malloc/Makefile.inc = b/lib/libc/stdlib/malloc/Makefile.inc > index bce4353fe80a..3bae4ff1505b 100644 > --- a/lib/libc/stdlib/malloc/Makefile.inc > +++ b/lib/libc/stdlib/malloc/Makefile.inc > @@ -1,3 +1,3 @@ > SYM_MAPS+=3D${LIBC_SRCTOP}/stdlib/malloc/Symbol.map >=20 > -.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 > index 1183a8202168..d7112cf57178 100644 > --- a/share/mk/src.opts.mk > +++ b/share/mk/src.opts.mk > @@ -228,6 +228,12 @@ __DEFAULT_DEPENDENT_OPTIONS=3D \ > LOADER_VERIEXEC_VECTX/LOADER_VERIEXEC \ > VERIEXEC/BEARSSL \ >=20 > +__SINGLE_OPTIONS =3D \ > + LIBC_MALLOC > + > +__LIBC_MALLOC_OPTIONS=3D jemalloc > +__LIBC_MALLOC_DEFAULT=3D 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 > index 000000000000..ee1883f3ee54 > --- /dev/null > +++ b/tools/build/options/LIBC_MALLOC > @@ -0,0 +1,13 @@ > +Specify the > +.Xr malloc 3 > +implementaiton used by libc. s/implementaiton/implementation/ Jess > +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.