Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jul 2024 21:24:54 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1c30cf95098e - main - malloc: Handle large malloc sizes in malloc_size()
Message-ID:  <202407242124.46OLOsEx083361@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=1c30cf95098e999ee24b2396763b4f65d021cdf0

commit 1c30cf95098e999ee24b2396763b4f65d021cdf0
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-07-24 20:16:20 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-07-24 21:24:46 +0000

    malloc: Handle large malloc sizes in malloc_size()
    
    Reviewed by:    kib, emaste
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D45661
---
 sys/kern/kern_malloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index b9460515bc14..4d07581e6a5b 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -1130,7 +1130,7 @@ malloc_size(size_t size)
 	int indx;
 
 	if (size > kmem_zmax)
-		return (0);
+		return (round_page(size));
 	if (size & KMEM_ZMASK)
 		size = (size & ~KMEM_ZMASK) + KMEM_ZBASE;
 	indx = kmemsize[size >> KMEM_ZSHIFT];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202407242124.46OLOsEx083361>