From nobody Tue Jan 21 00:26:41 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 4YcSgk72mqz5lC2x; Tue, 21 Jan 2025 00:26:42 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YcSgj6Fryz3Mg7; Tue, 21 Jan 2025 00:26:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737419201; 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=+gx9nfkAfVd1yG8CfQTjD+9N/uO4jBFqKcun3t+PgMk=; b=KP7HgWwT9WB7Cb56T1owRr6cSKOwRv9Nf9NOxct0UoEnpKas8UJZMAeA7Ait5dxAyV/Edq lO/tY8rQxw1j4ynKSED2h+afbgGMaoXDuNsgvOKgvJqL17zk14plWQkEUxqN8mhlwaLwBT 3oPT0kpXkljO8NVY1SeucLnHYoxbCyekiZL6GGuouNKDQTq16j82IpLOxwwQQ06+fU9Sv7 c3ZYIYUamVk/4WQsVqyQdIP5bcij+1rmfTT/+NtdD+QFtgoKuVyCHHuSpi0Fd0HIf4hFt1 tDMSK0WdwfDu24d/tT8FFhhosR7o2Y/yLsiANLGkfTZ5nYTm8zQPggUrwS1q8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737419201; 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=+gx9nfkAfVd1yG8CfQTjD+9N/uO4jBFqKcun3t+PgMk=; b=Bct4P2Awcahh+8CZhxLZwfPnTDzKZUU7PM7tgXPJWgNAdN+ubeEYw6BPjtVLE2wP4Xkrt5 aWZvuoUUqd43AOs1k9BpuFYK5L9CBl4YncBg+2xNZupAD+u65vI3eNdxibMkH8CZGO2VwV Ly+gETMcU0ym3t66C2wMI5I0Vh3Zi9CoKUgO50OQhx5XMPi2ZwyecZsYxUHV8QXHI4aB1L YmSza8JlAoOa1OmdlF99qbyAVD35t6rGhuoVceGqgV/T3A/3ZP2ds+NsReJ2ohezY88iLo Xxf1ZAwz6cGRXbK33PLuYqrfCcL0eumhEtPk248JkQyOpYRKlK2KkyGYRkhaKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737419201; a=rsa-sha256; cv=none; b=Jp7HhfgsgGcKbaP2Sr/eD8MY/rakf36zPw3dFCbMveTS7e7dwZlM/DXQrNGe9WDTWJWKvs 3SPNQDay4D0pDpGwYjhb+v1uEx7yxw1EWurbZGEqgXvxFHlst3VaCeGsg8iPSnkkCumhCN Tb5OwlCx2M00y58aKwsmai18B5G89+Qenyo3Qt59wmHdaCba53WYfqgdDc+AoCJu6IbgiY waDOG8JKC+E0XJEbN2W3ZkyJEQtsBIEgxyfRPcBQlsCJwqVwS5CxBbTYbQ+CERE0J1hyth TAz0mfjjLyfh5gGR7JKU2/2/Eyv3UL9rIkTx0tW+5R5ZG/REy4s/IrMRqr24HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcSgj5f9wzkSw; Tue, 21 Jan 2025 00:26:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50L0Qfbk013247; Tue, 21 Jan 2025 00:26:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50L0Qf7N013244; Tue, 21 Jan 2025 00:26:41 GMT (envelope-from git) Date: Tue, 21 Jan 2025 00:26:41 GMT Message-Id: <202501210026.50L0Qf7N013244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 205043060940 - stable/14 - libthr: switch thread and sleepq memory allocator to crt from libc malloc 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2050430609400237e4120e099c1aabd4e77e1c1e Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2050430609400237e4120e099c1aabd4e77e1c1e commit 2050430609400237e4120e099c1aabd4e77e1c1e Author: Konstantin Belousov AuthorDate: 2025-01-14 09:06:58 +0000 Commit: Konstantin Belousov CommitDate: 2025-01-21 00:24:55 +0000 libthr: switch thread and sleepq memory allocator to crt from libc malloc (cherry picked from commit 9a2ae72421cd75c741984f63b8c9ee89346a188d) --- lib/libthr/thread/thr_list.c | 4 ++-- lib/libthr/thread/thr_sleepq.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libthr/thread/thr_list.c b/lib/libthr/thread/thr_list.c index d13cead7e588..6b41951aaf59 100644 --- a/lib/libthr/thread/thr_list.c +++ b/lib/libthr/thread/thr_list.c @@ -151,7 +151,7 @@ _thr_alloc(struct pthread *curthread) if (total_threads > MAX_THREADS) return (NULL); atomic_add_int(&total_threads, 1); - thread = calloc(1, sizeof(struct pthread)); + thread = __thr_calloc(1, sizeof(struct pthread)); if (thread == NULL) { atomic_add_int(&total_threads, -1); return (NULL); @@ -223,7 +223,7 @@ thr_destroy(struct pthread *curthread __unused, struct pthread *thread) _sleepq_free(thread->sleepqueue); if (thread->wake_addr != NULL) _thr_release_wake_addr(thread->wake_addr); - free(thread); + __thr_free(thread); } /* diff --git a/lib/libthr/thread/thr_sleepq.c b/lib/libthr/thread/thr_sleepq.c index d7de9ab4e25a..9c680acd0ac0 100644 --- a/lib/libthr/thread/thr_sleepq.c +++ b/lib/libthr/thread/thr_sleepq.c @@ -62,7 +62,7 @@ _sleepq_alloc(void) { struct sleepqueue *sq; - sq = calloc(1, sizeof(struct sleepqueue)); + sq = __thr_calloc(1, sizeof(struct sleepqueue)); TAILQ_INIT(&sq->sq_blocked); SLIST_INIT(&sq->sq_freeq); return (sq); @@ -71,7 +71,7 @@ _sleepq_alloc(void) void _sleepq_free(struct sleepqueue *sq) { - free(sq); + __thr_free(sq); } void