Remove arena_malloc_prechosen().

Remove arena_malloc_prechosen(), now that arena_malloc() can be invoked
in a way that is semantically equivalent.
This commit is contained in:
Jason Evans 2012-04-06 12:24:46 -07:00
parent b147611b52
commit fad100bc35
2 changed files with 1 additions and 15 deletions

View File

@ -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)
{

View File

@ -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