From 31b43219dbf397f273350a66a3a594fdfbaa1e00 Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Wed, 19 Apr 2017 15:09:01 -0700 Subject: [PATCH] Header refactoring: size_classes module - remove from the catchall --- include/jemalloc/internal/arena_externs.h | 2 ++ include/jemalloc/internal/arena_inlines_b.h | 1 + include/jemalloc/internal/arena_structs_b.h | 2 ++ include/jemalloc/internal/base_structs.h | 3 +++ include/jemalloc/internal/bitmap_types.h | 2 ++ include/jemalloc/internal/ctl_structs.h | 2 ++ include/jemalloc/internal/extent_structs.h | 1 + include/jemalloc/internal/jemalloc_internal_includes.h | 1 - include/jemalloc/internal/jemalloc_internal_inlines_a.h | 1 + include/jemalloc/internal/rtree_inlines.h | 1 + include/jemalloc/internal/rtree_types.h | 2 ++ include/jemalloc/internal/stats_structs.h | 1 + include/jemalloc/internal/tcache_externs.h | 2 ++ include/jemalloc/internal/tcache_inlines.h | 1 + include/jemalloc/internal/tcache_structs.h | 1 + include/jemalloc/internal/tcache_types.h | 2 ++ src/arena.c | 1 + src/ctl.c | 1 + src/jemalloc.c | 1 + src/tcache.c | 1 + 20 files changed, 28 insertions(+), 1 deletion(-) diff --git a/include/jemalloc/internal/arena_externs.h b/include/jemalloc/internal/arena_externs.h index 0f86dc05..241165ec 100644 --- a/include/jemalloc/internal/arena_externs.h +++ b/include/jemalloc/internal/arena_externs.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_ARENA_EXTERNS_H #define JEMALLOC_INTERNAL_ARENA_EXTERNS_H +#include "jemalloc/internal/size_classes.h" + static const size_t large_pad = #ifdef JEMALLOC_CACHE_OBLIVIOUS PAGE diff --git a/include/jemalloc/internal/arena_inlines_b.h b/include/jemalloc/internal/arena_inlines_b.h index 054757d4..ca7af7fd 100644 --- a/include/jemalloc/internal/arena_inlines_b.h +++ b/include/jemalloc/internal/arena_inlines_b.h @@ -2,6 +2,7 @@ #define JEMALLOC_INTERNAL_ARENA_INLINES_B_H #include "jemalloc/internal/jemalloc_internal_types.h" +#include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/ticker.h" static inline szind_t diff --git a/include/jemalloc/internal/arena_structs_b.h b/include/jemalloc/internal/arena_structs_b.h index 7b133f2e..dbff7876 100644 --- a/include/jemalloc/internal/arena_structs_b.h +++ b/include/jemalloc/internal/arena_structs_b.h @@ -2,8 +2,10 @@ #define JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H #include "jemalloc/internal/atomic.h" +#include "jemalloc/internal/jemalloc_internal_types.h" #include "jemalloc/internal/nstime.h" #include "jemalloc/internal/ql.h" +#include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/ticker.h" /* diff --git a/include/jemalloc/internal/base_structs.h b/include/jemalloc/internal/base_structs.h index d79f38ee..1d0a1f3a 100644 --- a/include/jemalloc/internal/base_structs.h +++ b/include/jemalloc/internal/base_structs.h @@ -1,6 +1,9 @@ #ifndef JEMALLOC_INTERNAL_BASE_STRUCTS_H #define JEMALLOC_INTERNAL_BASE_STRUCTS_H +#include "jemalloc/internal/jemalloc_internal_types.h" +#include "jemalloc/internal/size_classes.h" + /* Embedded at the beginning of every block of base-managed virtual memory. */ struct base_block_s { /* Total size of block's virtual memory mapping. */ diff --git a/include/jemalloc/internal/bitmap_types.h b/include/jemalloc/internal/bitmap_types.h index b334769f..95f0dd12 100644 --- a/include/jemalloc/internal/bitmap_types.h +++ b/include/jemalloc/internal/bitmap_types.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_BITMAP_TYPES_H #define JEMALLOC_INTERNAL_BITMAP_TYPES_H +#include "jemalloc/internal/size_classes.h" + /* Maximum bitmap bit count is 2^LG_BITMAP_MAXBITS. */ #if LG_SLAB_MAXREGS > LG_CEIL_NSIZES /* Maximum bitmap bit count is determined by maximum regions per slab. */ diff --git a/include/jemalloc/internal/ctl_structs.h b/include/jemalloc/internal/ctl_structs.h index 2b48a68e..b0c37c9e 100644 --- a/include/jemalloc/internal/ctl_structs.h +++ b/include/jemalloc/internal/ctl_structs.h @@ -1,7 +1,9 @@ #ifndef JEMALLOC_INTERNAL_CTL_STRUCTS_H #define JEMALLOC_INTERNAL_CTL_STRUCTS_H +#include "jemalloc/internal/jemalloc_internal_types.h" #include "jemalloc/internal/ql.h" +#include "jemalloc/internal/size_classes.h" struct ctl_node_s { bool named; diff --git a/include/jemalloc/internal/extent_structs.h b/include/jemalloc/internal/extent_structs.h index 7066b8f6..aa0a3a75 100644 --- a/include/jemalloc/internal/extent_structs.h +++ b/include/jemalloc/internal/extent_structs.h @@ -5,6 +5,7 @@ #include "jemalloc/internal/ql.h" #include "jemalloc/internal/rb.h" #include "jemalloc/internal/ph.h" +#include "jemalloc/internal/size_classes.h" typedef enum { extent_state_active = 0, diff --git a/include/jemalloc/internal/jemalloc_internal_includes.h b/include/jemalloc/internal/jemalloc_internal_includes.h index f4a19862..3794c34c 100644 --- a/include/jemalloc/internal/jemalloc_internal_includes.h +++ b/include/jemalloc/internal/jemalloc_internal_includes.h @@ -40,7 +40,6 @@ /* TYPES */ /******************************************************************************/ -#include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/smoothstep.h" #include "jemalloc/internal/stats_types.h" #include "jemalloc/internal/ctl_types.h" diff --git a/include/jemalloc/internal/jemalloc_internal_inlines_a.h b/include/jemalloc/internal/jemalloc_internal_inlines_a.h index 06a5c717..1755c3ac 100644 --- a/include/jemalloc/internal/jemalloc_internal_inlines_a.h +++ b/include/jemalloc/internal/jemalloc_internal_inlines_a.h @@ -4,6 +4,7 @@ #include "jemalloc/internal/atomic.h" #include "jemalloc/internal/bit_util.h" #include "jemalloc/internal/jemalloc_internal_types.h" +#include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/ticker.h" JEMALLOC_ALWAYS_INLINE pszind_t diff --git a/include/jemalloc/internal/rtree_inlines.h b/include/jemalloc/internal/rtree_inlines.h index f4f7c2ca..7bc52383 100644 --- a/include/jemalloc/internal/rtree_inlines.h +++ b/include/jemalloc/internal/rtree_inlines.h @@ -1,6 +1,7 @@ #ifndef JEMALLOC_INTERNAL_RTREE_INLINES_H #define JEMALLOC_INTERNAL_RTREE_INLINES_H +#include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/spin.h" JEMALLOC_ALWAYS_INLINE uintptr_t diff --git a/include/jemalloc/internal/rtree_types.h b/include/jemalloc/internal/rtree_types.h index d9a4cf4d..402f741c 100644 --- a/include/jemalloc/internal/rtree_types.h +++ b/include/jemalloc/internal/rtree_types.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_RTREE_TYPES_H #define JEMALLOC_INTERNAL_RTREE_TYPES_H +#include "jemalloc/internal/size_classes.h" + /* * This radix tree implementation is tailored to the singular purpose of * associating metadata with extents that are currently owned by jemalloc. diff --git a/include/jemalloc/internal/stats_structs.h b/include/jemalloc/internal/stats_structs.h index dc994b52..3693a854 100644 --- a/include/jemalloc/internal/stats_structs.h +++ b/include/jemalloc/internal/stats_structs.h @@ -2,6 +2,7 @@ #define JEMALLOC_INTERNAL_STATS_STRUCTS_H #include "jemalloc/internal/atomic.h" +#include "jemalloc/internal/size_classes.h" #ifdef JEMALLOC_ATOMIC_U64 typedef atomic_u64_t arena_stats_u64_t; diff --git a/include/jemalloc/internal/tcache_externs.h b/include/jemalloc/internal/tcache_externs.h index 75ff3214..abe133fa 100644 --- a/include/jemalloc/internal/tcache_externs.h +++ b/include/jemalloc/internal/tcache_externs.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_TCACHE_EXTERNS_H #define JEMALLOC_INTERNAL_TCACHE_EXTERNS_H +#include "jemalloc/internal/size_classes.h" + extern bool opt_tcache; extern ssize_t opt_lg_tcache_max; diff --git a/include/jemalloc/internal/tcache_inlines.h b/include/jemalloc/internal/tcache_inlines.h index 25931d82..8a65ba2b 100644 --- a/include/jemalloc/internal/tcache_inlines.h +++ b/include/jemalloc/internal/tcache_inlines.h @@ -2,6 +2,7 @@ #define JEMALLOC_INTERNAL_TCACHE_INLINES_H #include "jemalloc/internal/jemalloc_internal_types.h" +#include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/ticker.h" #include "jemalloc/internal/util.h" diff --git a/include/jemalloc/internal/tcache_structs.h b/include/jemalloc/internal/tcache_structs.h index c01098f1..cd0cea55 100644 --- a/include/jemalloc/internal/tcache_structs.h +++ b/include/jemalloc/internal/tcache_structs.h @@ -2,6 +2,7 @@ #define JEMALLOC_INTERNAL_TCACHE_STRUCTS_H #include "jemalloc/internal/ql.h" +#include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/ticker.h" /* diff --git a/include/jemalloc/internal/tcache_types.h b/include/jemalloc/internal/tcache_types.h index a60db6ff..1155d62c 100644 --- a/include/jemalloc/internal/tcache_types.h +++ b/include/jemalloc/internal/tcache_types.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_TCACHE_TYPES_H #define JEMALLOC_INTERNAL_TCACHE_TYPES_H +#include "jemalloc/internal/size_classes.h" + typedef struct tcache_bin_info_s tcache_bin_info_t; typedef struct tcache_bin_s tcache_bin_t; typedef struct tcache_s tcache_t; diff --git a/src/arena.c b/src/arena.c index 40561c03..77f72828 100644 --- a/src/arena.c +++ b/src/arena.c @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/util.h" /******************************************************************************/ diff --git a/src/ctl.c b/src/ctl.c index 72372d55..c054ded6 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -4,6 +4,7 @@ #include "jemalloc/internal/assert.h" #include "jemalloc/internal/nstime.h" +#include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/util.h" /******************************************************************************/ diff --git a/src/jemalloc.c b/src/jemalloc.c index 108258bd..602cf677 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -6,6 +6,7 @@ #include "jemalloc/internal/atomic.h" #include "jemalloc/internal/jemalloc_internal_types.h" #include "jemalloc/internal/malloc_io.h" +#include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/spin.h" #include "jemalloc/internal/ticker.h" #include "jemalloc/internal/util.h" diff --git a/src/tcache.c b/src/tcache.c index 72d1e47f..c272a3c4 100644 --- a/src/tcache.c +++ b/src/tcache.c @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/size_classes.h" /******************************************************************************/ /* Data. */