From e587a46505f463b3738cad93914a6e2eff12da0d Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 23 Feb 2021 13:50:16 +0000 Subject: [PATCH] remove unused malloc_roundup() --- sys/kern/kern_malloc.c | 14 +------------- sys/sys/malloc.h | 3 +-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 84505ab13e7..2c768625607 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc.c,v 1.143 2020/12/31 11:04:35 claudio Exp $ */ +/* $OpenBSD: kern_malloc.c,v 1.144 2021/02/23 13:50:16 jsg Exp $ */ /* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */ /* @@ -695,18 +695,6 @@ sysctl_malloc(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, /* NOTREACHED */ } -/* - * Round up a size to how much malloc would actually allocate. - */ -size_t -malloc_roundup(size_t sz) -{ - if (sz > MAXALLOCSAVE) - return round_page(sz); - - return (1 << BUCKETINDX(sz)); -} - #if defined(DDB) void diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index ff8e09b8a24..7db0284af2e 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.h,v 1.119 2019/11/28 16:23:11 guenther Exp $ */ +/* $OpenBSD: malloc.h,v 1.120 2021/02/23 13:50:16 jsg Exp $ */ /* $NetBSD: malloc.h,v 1.39 1998/07/12 19:52:01 augustss Exp $ */ /* @@ -395,7 +395,6 @@ void free(void *, int, size_t); int sysctl_malloc(int *, u_int, void *, size_t *, void *, size_t, struct proc *); -size_t malloc_roundup(size_t); void malloc_printit(int (*)(const char *, ...)); void poison_mem(void *, size_t); -- 2.20.1