From owner-dev-commits-src-all@freebsd.org Tue Aug 3 02:12:56 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B1F867E702; Tue, 3 Aug 2021 02:12:56 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gdz141fN7z4Twl; Tue, 3 Aug 2021 02:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 21D802C10; Tue, 3 Aug 2021 02:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1732CuJV065683; Tue, 3 Aug 2021 02:12:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1732Cufb065682; Tue, 3 Aug 2021 02:12:56 GMT (envelope-from git) Date: Tue, 3 Aug 2021 02:12:56 GMT Message-Id: <202108030212.1732Cufb065682@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 04cc0c393c31 - main - malloc(9): provide missing malloc_aligned implementation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04cc0c393c317b6d5e28c8dc80cd1b5ea071f28f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2021 02:12:56 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=04cc0c393c317b6d5e28c8dc80cd1b5ea071f28f commit 04cc0c393c317b6d5e28c8dc80cd1b5ea071f28f Author: Kyle Evans AuthorDate: 2021-08-03 02:11:44 +0000 Commit: Kyle Evans CommitDate: 2021-08-03 02:12:39 +0000 malloc(9): provide missing malloc_aligned implementation Pointy hat: kevans Fixes: 6162cf885c00 ("malloc(9): Document/complete aligned variants") --- sys/kern/kern_malloc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index bd0f46ea5220..0c2f1689d194 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -771,6 +771,13 @@ malloc_domainset_exec(size_t size, struct malloc_type *mtp, struct domainset *ds return (malloc_large(size, mtp, ds, flags DEBUG_REDZONE_ARG)); } +void * +malloc_aligned(size_t size, size_t align, struct malloc_type *type, int flags) +{ + return (malloc_domainset_aligned(size, align, type, DOMAINSET_RR(), + flags)); +} + void * malloc_domainset_aligned(size_t size, size_t align, struct malloc_type *mtp, struct domainset *ds, int flags)