From nobody Tue Apr 12 21:59:35 2022 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 49D411AFC830; Tue, 12 Apr 2022 21:59:36 +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 4KdKPz6Jc1z4j4W; Tue, 12 Apr 2022 21:59:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649800776; 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=OJbO9J0OGACaGPOAvJowCyGC9p1Gwn99ZOxohshaxxI=; b=VjZZF+zSNV2PatVN7wUYDO6aom5erCErmMEC6xy5POeuYJWFLLKq+DVCeYTd6u7MWdZtUf 5LqggsabJKFdEU5UFnipoADABVhtLOUL/XD7EZmA7JIbdWAOQvnDCgzsXSib9qdX6XPNzO sPtdgSttwF8JVmptO8NKF0QtgBqX+xhiVbmZS+0T+hNrumQlkD9VgFmh++m3eLEuzKr8Pb UeUa6UJm2Qfj/genHVxA5jVv9pluHqL9mWhzU+Mz6zd/8pTeNvf6M/UMO4Q7bFNvtE2YM2 m8Qjws5ilxobPgMe1gwTVgutFkwwn2NkVQyRXr8h5z6TnfMHWk/wlTTVcSb7Gg== 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 9E9121F886; Tue, 12 Apr 2022 21:59:35 +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 23CLxZpd035729; Tue, 12 Apr 2022 21:59:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23CLxZ1W035728; Tue, 12 Apr 2022 21:59:35 GMT (envelope-from git) Date: Tue, 12 Apr 2022 21:59:35 GMT Message-Id: <202204122159.23CLxZ1W035728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: dbd51c416a80 - main - realloc(9): Move slab and zone under #ifndef DEBUG_REDZONE. 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dbd51c416a80ff9953c4bfdb266673628b21303c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649800776; 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=OJbO9J0OGACaGPOAvJowCyGC9p1Gwn99ZOxohshaxxI=; b=sD1yQd6+3iVYX4aI2Jmx6GLpQaHCrfile5x7SD7KofllL/tsVAQVTCLp4kYshZdRVt81HA GgI5H+jjPJ2hfb2+1CAnKcr6LQdvBwD4ijIzfPA1UYLqUWGWm9jjQAGiltVAxC9xK+EePk 27X0xhreeraKQ2leJBlbiDjuurEcY/B2A9QRGfpn2aUf3JYVMc5vSO9/xcbwoDP2u+osF5 w58oZvxZG2be22AFyqDpUjm4CQzsSVz0ydBbeposKRg/xuMrbi89TwfF4KZuWffhhcXHtb Cz2rPnPjrJVkX0i4aSVkLHD65XSh1chlO8kPNJC5trYU0JIbcPxQjNUEgGvfgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649800776; a=rsa-sha256; cv=none; b=CNwHH1284g5JpZFG52zVCSqmwuWQcgPGMT4IUSxO3tniVLJiGpq4aidf/purnmHt8r4BSg Wcu32leWrSBlhHrtZao/dFWUa3jTqZnvU7Jb6HDFta60gKEi5juLoFyibYD8hfjnI5dsyG TcYio3wVdaBDhyhg5qKqOaIbAMsZzEz/Key1rh63EMYAueVcHvJTnycqRzkjzWcG1D+EUe valh8wnY/c/ARLJ9/0LOdLjtZFIjS3Kea+fuRjrNztlbicd3Gu4KL84YWG+RR3N8zYNLJz SUuLewM8/UtmM5HtDR4BQamjtXea1vckL3WHfcMwoC+GRt6qWgFaDRBCXNxz9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dbd51c416a80ff9953c4bfdb266673628b21303c commit dbd51c416a80ff9953c4bfdb266673628b21303c Author: John Baldwin AuthorDate: 2022-04-12 21:58:59 +0000 Commit: John Baldwin CommitDate: 2022-04-12 21:58:59 +0000 realloc(9): Move slab and zone under #ifndef DEBUG_REDZONE. --- sys/kern/kern_malloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 4ecdcdacce01..eb70e4e6cd57 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -986,8 +986,10 @@ zfree(void *addr, struct malloc_type *mtp) void * realloc(void *addr, size_t size, struct malloc_type *mtp, int flags) { +#ifndef DEBUG_REDZONE uma_zone_t zone; uma_slab_t slab; +#endif unsigned long alloc; void *newaddr; @@ -1011,8 +1013,6 @@ realloc(void *addr, size_t size, struct malloc_type *mtp, int flags) #endif #ifdef DEBUG_REDZONE - slab = NULL; - zone = NULL; alloc = redzone_get_size(addr); #else vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab);