diff --git a/include/jemalloc/internal/arena_structs.h b/include/jemalloc/internal/arena_structs.h index ad76a79a..e2a5a408 100644 --- a/include/jemalloc/internal/arena_structs.h +++ b/include/jemalloc/internal/arena_structs.h @@ -1,5 +1,5 @@ -#ifndef JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H -#define JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H +#ifndef JEMALLOC_INTERNAL_ARENA_STRUCTS_H +#define JEMALLOC_INTERNAL_ARENA_STRUCTS_H #include "jemalloc/internal/arena_stats.h" #include "jemalloc/internal/atomic.h" @@ -98,4 +98,4 @@ struct arena_s { bin_t bins[0]; }; -#endif /* JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H */ +#endif /* JEMALLOC_INTERNAL_ARENA_STRUCTS_H */ diff --git a/include/jemalloc/internal/arena_types.h b/include/jemalloc/internal/arena_types.h index f763a8ca..d0e12917 100644 --- a/include/jemalloc/internal/arena_types.h +++ b/include/jemalloc/internal/arena_types.h @@ -43,7 +43,7 @@ typedef enum { struct arena_config_s { /* extent hooks to be used for the arena */ - struct extent_hooks_s *extent_hooks; + extent_hooks_t *extent_hooks; /* * Use extent hooks for metadata (base) allocations when true. diff --git a/include/jemalloc/internal/jemalloc_internal_inlines_a.h b/include/jemalloc/internal/jemalloc_internal_inlines_a.h index 1bca34cf..9e27cc30 100644 --- a/include/jemalloc/internal/jemalloc_internal_inlines_a.h +++ b/include/jemalloc/internal/jemalloc_internal_inlines_a.h @@ -65,8 +65,7 @@ arena_get(tsdn_t *tsdn, unsigned ind, bool init_if_missing) { ret = (arena_t *)atomic_load_p(&arenas[ind], ATOMIC_ACQUIRE); if (unlikely(ret == NULL)) { if (init_if_missing) { - ret = arena_init(tsdn, ind, - &arena_config_default); + ret = arena_init(tsdn, ind, &arena_config_default); } } return ret; diff --git a/src/base.c b/src/base.c index cc127ea0..38f6fa4b 100644 --- a/src/base.c +++ b/src/base.c @@ -298,7 +298,7 @@ base_block_alloc(tsdn_t *tsdn, base_t *base, ehooks_t *ehooks, unsigned ind, static ehooks_t * base_ehooks_get_for_metadata(base_t *base) { return base->metadata_use_hooks ? &base->ehooks : - (struct ehooks_s *)&ehooks_default_extent_hooks; + (ehooks_t *)&ehooks_default_extent_hooks; } /* @@ -522,7 +522,7 @@ base_postfork_child(tsdn_t *tsdn, base_t *base) { bool base_boot(tsdn_t *tsdn) { - b0 = base_new(tsdn, 0, - (extent_hooks_t *)&ehooks_default_extent_hooks, true); + b0 = base_new(tsdn, 0, (extent_hooks_t *)&ehooks_default_extent_hooks, + /* metadata_use_hooks */ true); return (b0 == NULL); } diff --git a/src/jemalloc.c b/src/jemalloc.c index 907265c0..8e04fa6f 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -570,8 +570,7 @@ arena_choose_hard(tsd_t *tsd, bool internal) { /* Initialize a new arena. */ choose[j] = first_null; arena = arena_init_locked(tsd_tsdn(tsd), - choose[j], - &arena_config_default); + choose[j], &arena_config_default); if (arena == NULL) { malloc_mutex_unlock(tsd_tsdn(tsd), &arenas_lock); diff --git a/test/unit/pa.c b/test/unit/pa.c index fcf22237..10fa1b28 100644 --- a/test/unit/pa.c +++ b/test/unit/pa.c @@ -53,8 +53,8 @@ test_data_t *init_test_data(ssize_t dirty_decay_ms, ssize_t muzzy_decay_ms) { assert_ptr_not_null(test_data, ""); init_test_extent_hooks(&test_data->hooks); - base_t *base = base_new(TSDN_NULL, /* ind */ 1, - &test_data->hooks, /* metadata_use_hooks */ true); + base_t *base = base_new(TSDN_NULL, /* ind */ 1, &test_data->hooks, + /* metadata_use_hooks */ true); assert_ptr_not_null(base, ""); test_data->base = base; diff --git a/test/unit/rtree.c b/test/unit/rtree.c index 82b617bd..4101b72b 100644 --- a/test/unit/rtree.c +++ b/test/unit/rtree.c @@ -12,8 +12,8 @@ TEST_BEGIN(test_rtree_read_empty) { tsdn = tsdn_fetch(); - base_t *base = base_new(tsdn, 0, - &ehooks_default_extent_hooks, /* metadata_use_hooks */ true); + base_t *base = base_new(tsdn, 0, &ehooks_default_extent_hooks, + /* metadata_use_hooks */ true); expect_ptr_not_null(base, "Unexpected base_new failure"); rtree_t *rtree = &test_rtree; @@ -53,8 +53,8 @@ TEST_BEGIN(test_rtree_extrema) { tsdn_t *tsdn = tsdn_fetch(); - base_t *base = base_new(tsdn, 0, - &ehooks_default_extent_hooks, /* metadata_use_hooks */ true); + base_t *base = base_new(tsdn, 0, &ehooks_default_extent_hooks, + /* metadata_use_hooks */ true); expect_ptr_not_null(base, "Unexpected base_new failure"); rtree_t *rtree = &test_rtree; @@ -105,8 +105,8 @@ TEST_END TEST_BEGIN(test_rtree_bits) { tsdn_t *tsdn = tsdn_fetch(); - base_t *base = base_new(tsdn, 0, - &ehooks_default_extent_hooks, /* metadata_use_hooks */ true); + base_t *base = base_new(tsdn, 0, &ehooks_default_extent_hooks, + /* metadata_use_hooks */ true); expect_ptr_not_null(base, "Unexpected base_new failure"); uintptr_t keys[] = {PAGE, PAGE + 1, @@ -155,8 +155,8 @@ TEST_BEGIN(test_rtree_random) { sfmt_t *sfmt = init_gen_rand(SEED); tsdn_t *tsdn = tsdn_fetch(); - base_t *base = base_new(tsdn, 0, - &ehooks_default_extent_hooks, /* metadata_use_hooks */ true); + base_t *base = base_new(tsdn, 0, &ehooks_default_extent_hooks, + /* metadata_use_hooks */ true); expect_ptr_not_null(base, "Unexpected base_new failure"); uintptr_t keys[NSET]; @@ -254,8 +254,8 @@ test_rtree_range_write(tsdn_t *tsdn, rtree_t *rtree, uintptr_t start, TEST_BEGIN(test_rtree_range) { tsdn_t *tsdn = tsdn_fetch(); - base_t *base = base_new(tsdn, 0, - &ehooks_default_extent_hooks, /* metadata_use_hooks */ true); + base_t *base = base_new(tsdn, 0, &ehooks_default_extent_hooks, + /* metadata_use_hooks */ true); expect_ptr_not_null(base, "Unexpected base_new failure"); rtree_t *rtree = &test_rtree;