From fad100bc35efba262f2c98cefc134899d393c734 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Fri, 6 Apr 2012 12:24:46 -0700 Subject: [PATCH] Remove arena_malloc_prechosen(). Remove arena_malloc_prechosen(), now that arena_malloc() can be invoked in a way that is semantically equivalent. --- include/jemalloc/internal/arena.h | 14 -------------- src/tsd.c | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h index 03e3f3ce..d25a2b1d 100644 --- a/include/jemalloc/internal/arena.h +++ b/include/jemalloc/internal/arena.h @@ -391,7 +391,6 @@ unsigned arena_run_regind(arena_run_t *run, arena_bin_info_t *bin_info, prof_ctx_t *arena_prof_ctx_get(const void *ptr); void arena_prof_ctx_set(const void *ptr, prof_ctx_t *ctx); void *arena_malloc(arena_t *arena, size_t size, bool zero, bool try_tcache); -void *arena_malloc_prechosen(arena_t *arena, size_t size, bool zero); void arena_dalloc(arena_t *arena, arena_chunk_t *chunk, void *ptr, bool try_tcache); #endif @@ -578,19 +577,6 @@ arena_malloc(arena_t *arena, size_t size, bool zero, bool try_tcache) } } -JEMALLOC_INLINE void * -arena_malloc_prechosen(arena_t *arena, size_t size, bool zero) -{ - - assert(size != 0); - assert(size <= arena_maxclass); - - if (size <= SMALL_MAXCLASS) - return (arena_malloc_small(arena, size, zero)); - else - return (arena_malloc_large(arena, size, zero)); -} - JEMALLOC_INLINE void arena_dalloc(arena_t *arena, arena_chunk_t *chunk, void *ptr, bool try_tcache) { diff --git a/src/tsd.c b/src/tsd.c index 669ea8fc..0838dc86 100644 --- a/src/tsd.c +++ b/src/tsd.c @@ -14,7 +14,7 @@ malloc_tsd_malloc(size_t size) { /* Avoid choose_arena() in order to dodge bootstrapping issues. */ - return arena_malloc_prechosen(arenas[0], size, false); + return arena_malloc(arenas[0], size, false, false); } void