[PATCH] Use s2u in zone_good_size
Mike Hommey
mh+jemalloc at glandium.org
Tue Feb 21 08:31:41 PST 2012
From: Mike Hommey <mh at glandium.org>
---
src/zone.c | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
diff --git a/src/zone.c b/src/zone.c
index 2c1b231..190954d 100644
--- a/src/zone.c
+++ b/src/zone.c
@@ -133,22 +133,7 @@ zone_destroy(malloc_zone_t *zone)
static size_t
zone_good_size(malloc_zone_t *zone, size_t size)
{
- size_t ret;
- void *p;
-
- /*
- * Actually create an object of the appropriate size, then find out
- * how large it could have been without moving up to the next size
- * class.
- */
- p = JEMALLOC_P(malloc)(size);
- if (p != NULL) {
- ret = isalloc(p);
- JEMALLOC_P(free)(p);
- } else
- ret = size;
-
- return (ret);
+ return s2u(size);
}
static void
--
1.7.9
More information about the jemalloc-discuss
mailing list