mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-26 00:53:34 +03:00
Move bin functions from arena.c to bin.c
This is a clean-up change that gives the bin functions implemented in the area code a prefix of bin_ and moves them into the bin code. To further decouple the bin code from the arena code, bin functions that had taken an arena_t to check arena_is_auto now take an is_auto parameter instead.
This commit is contained in:
parent
c73ab1c2ff
commit
1cc563f531
7 changed files with 326 additions and 305 deletions
|
|
@ -41,7 +41,7 @@ large_palloc(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* See comments in arena_bin_slabs_full_insert(). */
|
||||
/* See comments in bin_slabs_full_insert(). */
|
||||
if (!arena_is_auto(arena)) {
|
||||
/* Insert edata into large. */
|
||||
malloc_mutex_lock(tsdn, &arena->large_mtx);
|
||||
|
|
@ -233,7 +233,7 @@ static void
|
|||
large_dalloc_prep_impl(
|
||||
tsdn_t *tsdn, arena_t *arena, edata_t *edata, bool locked) {
|
||||
if (!locked) {
|
||||
/* See comments in arena_bin_slabs_full_insert(). */
|
||||
/* See comments in bin_slabs_full_insert(). */
|
||||
if (!arena_is_auto(arena)) {
|
||||
malloc_mutex_lock(tsdn, &arena->large_mtx);
|
||||
edata_list_active_remove(&arena->large, edata);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue