The branch main has been updated by markj:

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

commit 1c30cf95098e999ee24b2396763b4f65d021cdf0
Author:     Mark Johnston <[email protected]>
AuthorDate: 2024-07-24 20:16:20 +0000
Commit:     Mark Johnston <[email protected]>
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];

Reply via email to