From d9ec36e22dfe61f3fb972dee33a5cae529e46b07 Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Tue, 11 Apr 2017 14:43:12 -0700 Subject: [PATCH] Header refactoring: move assert.h out of the catch-all --- include/jemalloc/internal/hash_inlines.h | 2 ++ include/jemalloc/internal/jemalloc_internal_includes.h | 6 ------ src/arena.c | 1 + src/base.c | 2 ++ src/bitmap.c | 2 ++ src/ckh.c | 1 + src/ctl.c | 1 + src/extent.c | 3 ++- src/extent_dss.c | 2 ++ src/extent_mmap.c | 2 ++ src/jemalloc.c | 1 + src/large.c | 1 + src/mutex.c | 1 + src/nstime.c | 2 ++ src/pages.c | 1 + src/prof.c | 1 + src/rtree.c | 2 ++ src/stats.c | 2 ++ src/tcache.c | 2 ++ src/tsd.c | 2 ++ src/witness.c | 1 + src/zone.c | 3 +++ 22 files changed, 34 insertions(+), 7 deletions(-) diff --git a/include/jemalloc/internal/hash_inlines.h b/include/jemalloc/internal/hash_inlines.h index b134492a..321c17cc 100644 --- a/include/jemalloc/internal/hash_inlines.h +++ b/include/jemalloc/internal/hash_inlines.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_HASH_INLINES_H #define JEMALLOC_INTERNAL_HASH_INLINES_H +#include "jemalloc/internal/assert.h" + /* * The following hash function is based on MurmurHash3, placed into the public * domain by Austin Appleby. See https://github.com/aappleby/smhasher for diff --git a/include/jemalloc/internal/jemalloc_internal_includes.h b/include/jemalloc/internal/jemalloc_internal_includes.h index 3a9c6ca2..1539c909 100644 --- a/include/jemalloc/internal/jemalloc_internal_includes.h +++ b/include/jemalloc/internal/jemalloc_internal_includes.h @@ -36,12 +36,6 @@ * global jemalloc definitions, however. */ -/******************************************************************************/ -/* HERMETIC HEADERS */ -/******************************************************************************/ - -#include "jemalloc/internal/assert.h" - /******************************************************************************/ /* TYPES */ /******************************************************************************/ diff --git a/src/arena.c b/src/arena.c index 27a0f75c..bb45a90c 100644 --- a/src/arena.c +++ b/src/arena.c @@ -2,6 +2,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" #include "jemalloc/internal/util.h" /******************************************************************************/ diff --git a/src/base.c b/src/base.c index caec9557..3de6e3b0 100644 --- a/src/base.c +++ b/src/base.c @@ -2,6 +2,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" + /******************************************************************************/ /* Data. */ diff --git a/src/bitmap.c b/src/bitmap.c index 2eb50f1b..275636b9 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -2,6 +2,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" + /******************************************************************************/ void diff --git a/src/ckh.c b/src/ckh.c index ce977e14..aaa97924 100644 --- a/src/ckh.c +++ b/src/ckh.c @@ -38,6 +38,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" #include "jemalloc/internal/malloc_io.h" #include "jemalloc/internal/util.h" diff --git a/src/ctl.c b/src/ctl.c index 29689c8e..4fba2cd2 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -2,6 +2,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" #include "jemalloc/internal/util.h" /******************************************************************************/ diff --git a/src/extent.c b/src/extent.c index 0bfc555d..6b7da3f9 100644 --- a/src/extent.c +++ b/src/extent.c @@ -1,9 +1,10 @@ #define JEMALLOC_EXTENT_C_ #include "jemalloc/internal/jemalloc_preamble.h" +#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" #include "jemalloc/internal/ph.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" /******************************************************************************/ /* Data. */ diff --git a/src/extent_dss.c b/src/extent_dss.c index c609f14c..06bccc83 100644 --- a/src/extent_dss.c +++ b/src/extent_dss.c @@ -2,6 +2,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" + /******************************************************************************/ /* Data. */ diff --git a/src/extent_mmap.c b/src/extent_mmap.c index 5717573e..9381dc16 100644 --- a/src/extent_mmap.c +++ b/src/extent_mmap.c @@ -2,6 +2,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" + /******************************************************************************/ static void * diff --git a/src/jemalloc.c b/src/jemalloc.c index 7e3ec6ea..d6b21586 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -2,6 +2,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" #include "jemalloc/internal/atomic.h" #include "jemalloc/internal/malloc_io.h" #include "jemalloc/internal/util.h" diff --git a/src/large.c b/src/large.c index aa3ea1ff..629656d0 100644 --- a/src/large.c +++ b/src/large.c @@ -2,6 +2,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" #include "jemalloc/internal/util.h" /******************************************************************************/ diff --git a/src/mutex.c b/src/mutex.c index 92c23dab..3bb5ce1d 100644 --- a/src/mutex.c +++ b/src/mutex.c @@ -2,6 +2,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" #include "jemalloc/internal/malloc_io.h" #if defined(JEMALLOC_LAZY_LOCK) && !defined(_WIN32) diff --git a/src/nstime.c b/src/nstime.c index ee8d78e7..e0895476 100644 --- a/src/nstime.c +++ b/src/nstime.c @@ -1,6 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" + #define BILLION UINT64_C(1000000000) #define MILLION UINT64_C(1000000) diff --git a/src/pages.c b/src/pages.c index f1138231..7fa254f7 100644 --- a/src/pages.c +++ b/src/pages.c @@ -2,6 +2,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" #include "jemalloc/internal/malloc_io.h" #ifdef JEMALLOC_SYSCTL_VM_OVERCOMMIT diff --git a/src/prof.c b/src/prof.c index 276ca360..f2b21f72 100644 --- a/src/prof.c +++ b/src/prof.c @@ -2,6 +2,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" #include "jemalloc/internal/malloc_io.h" /******************************************************************************/ diff --git a/src/rtree.c b/src/rtree.c index 8d11d99f..ada6e9d5 100644 --- a/src/rtree.c +++ b/src/rtree.c @@ -2,6 +2,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" + /* * Only the most significant bits of keys passed to rtree_{read,write}() are * used. diff --git a/src/stats.c b/src/stats.c index 110d62f7..bbba4679 100644 --- a/src/stats.c +++ b/src/stats.c @@ -2,6 +2,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" + const char *global_mutex_names[num_global_prof_mutexes] = { #define OP(mtx) #mtx, GLOBAL_PROF_MUTEXES diff --git a/src/tcache.c b/src/tcache.c index 7e71bb6a..971c016b 100644 --- a/src/tcache.c +++ b/src/tcache.c @@ -2,6 +2,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" + /******************************************************************************/ /* Data. */ diff --git a/src/tsd.c b/src/tsd.c index cb7dd3fb..686b4ef4 100644 --- a/src/tsd.c +++ b/src/tsd.c @@ -2,6 +2,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" + /******************************************************************************/ /* Data. */ diff --git a/src/witness.c b/src/witness.c index bd040826..edb736bf 100644 --- a/src/witness.c +++ b/src/witness.c @@ -2,6 +2,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/assert.h" #include "jemalloc/internal/malloc_io.h" void diff --git a/src/zone.c b/src/zone.c index a8a571fd..37bc8da9 100644 --- a/src/zone.c +++ b/src/zone.c @@ -1,5 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" + +#include "jemalloc/internal/assert.h" + #ifndef JEMALLOC_ZONE # error "This source file is for zones on Darwin (OS X)." #endif