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:
parent
b147611b52
commit
fad100bc35
@ -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);
|
prof_ctx_t *arena_prof_ctx_get(const void *ptr);
|
||||||
void arena_prof_ctx_set(const void *ptr, prof_ctx_t *ctx);
|
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(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,
|
void arena_dalloc(arena_t *arena, arena_chunk_t *chunk, void *ptr,
|
||||||
bool try_tcache);
|
bool try_tcache);
|
||||||
#endif
|
#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
|
JEMALLOC_INLINE void
|
||||||
arena_dalloc(arena_t *arena, arena_chunk_t *chunk, void *ptr, bool try_tcache)
|
arena_dalloc(arena_t *arena, arena_chunk_t *chunk, void *ptr, bool try_tcache)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ malloc_tsd_malloc(size_t size)
|
|||||||
{
|
{
|
||||||
|
|
||||||
/* Avoid choose_arena() in order to dodge bootstrapping issues. */
|
/* 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
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user