From da18bdc169dd84a6caba559f9d1928ae3b94bff1 Mon Sep 17 00:00:00 2001 From: Slobodan Predolac Date: Wed, 27 May 2026 18:56:21 -0400 Subject: [PATCH] Drop umbrella include from 10 more .c files (batch 3) Converted: hpa_hooks, san_bump, sz, cache_bin, bitmap, hpa_central, witness, fxp, buf_writer, edata_cache. No latent hermeticity bugs in headers this batch -- a few .c files just needed previously-transitive includes added (e.g. hpa_central.c needed hpa.h for hpa_supported()). Step 6 (Option B) of the cyclical-dep cleanup, batch 3 of N. --- src/bitmap.c | 2 +- src/buf_writer.c | 3 ++- src/cache_bin.c | 2 +- src/edata_cache.c | 4 +++- src/fxp.c | 2 +- src/hpa_central.c | 2 +- src/hpa_hooks.c | 3 ++- src/san_bump.c | 9 +++++---- src/sz.c | 2 +- src/witness.c | 2 +- 10 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/bitmap.c b/src/bitmap.c index 8ac81a67..c399a05c 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -1,7 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/bitmap.h" /******************************************************************************/ diff --git a/src/buf_writer.c b/src/buf_writer.c index 3c298502..48b94100 100644 --- a/src/buf_writer.c +++ b/src/buf_writer.c @@ -1,7 +1,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/buf_writer.h" +#include "jemalloc/internal/jemalloc_internal_inlines_a.h" +#include "jemalloc/internal/jemalloc_internal_inlines_c.h" #include "jemalloc/internal/malloc_io.h" static void * diff --git a/src/cache_bin.c b/src/cache_bin.c index ec677948..170e21b0 100644 --- a/src/cache_bin.c +++ b/src/cache_bin.c @@ -1,6 +1,6 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/base.h" #include "jemalloc/internal/bit_util.h" #include "jemalloc/internal/cache_bin.h" #include "jemalloc/internal/safety_check.h" diff --git a/src/edata_cache.c b/src/edata_cache.c index 3ac8273a..68a399da 100644 --- a/src/edata_cache.c +++ b/src/edata_cache.c @@ -1,5 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" + +#include "jemalloc/internal/edata_cache.h" +#include "jemalloc/internal/witness.h" bool edata_cache_init(edata_cache_t *edata_cache, base_t *base) { diff --git a/src/fxp.c b/src/fxp.c index faeab207..ff3de54e 100644 --- a/src/fxp.c +++ b/src/fxp.c @@ -1,7 +1,7 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/fxp.h" +#include "jemalloc/internal/malloc_io.h" static bool fxp_isdigit(char c) { diff --git a/src/hpa_central.c b/src/hpa_central.c index b4f770c2..9d75f501 100644 --- a/src/hpa_central.c +++ b/src/hpa_central.c @@ -1,6 +1,6 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/hpa.h" #include "jemalloc/internal/hpa_central.h" #include "jemalloc/internal/tsd.h" #include "jemalloc/internal/witness.h" diff --git a/src/hpa_hooks.c b/src/hpa_hooks.c index 2ec7029d..1c292732 100644 --- a/src/hpa_hooks.c +++ b/src/hpa_hooks.c @@ -1,8 +1,9 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/hpa_hooks.h" #include "jemalloc/internal/jemalloc_probe.h" +#include "jemalloc/internal/nstime.h" +#include "jemalloc/internal/pages.h" static void *hpa_hooks_map(size_t size); static void hpa_hooks_unmap(void *ptr, size_t size); diff --git a/src/san_bump.c b/src/san_bump.c index 11031290..30b90b04 100644 --- a/src/san_bump.c +++ b/src/san_bump.c @@ -1,11 +1,12 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" -#include "jemalloc/internal/san_bump.h" +#include "jemalloc/internal/edata_cache.h" +#include "jemalloc/internal/ehooks.h" +#include "jemalloc/internal/extent.h" +#include "jemalloc/internal/mutex.h" #include "jemalloc/internal/pac.h" #include "jemalloc/internal/san.h" -#include "jemalloc/internal/ehooks.h" -#include "jemalloc/internal/edata_cache.h" +#include "jemalloc/internal/san_bump.h" static bool san_bump_grow_locked(tsdn_t *tsdn, san_bump_alloc_t *sba, pac_t *pac, ehooks_t *ehooks, size_t size); diff --git a/src/sz.c b/src/sz.c index da92f2b4..5cff6f8b 100644 --- a/src/sz.c +++ b/src/sz.c @@ -1,5 +1,5 @@ #include "jemalloc/internal/jemalloc_preamble.h" -#include "jemalloc/internal/jemalloc_internal_includes.h" + #include "jemalloc/internal/sz.h" JEMALLOC_ALIGNED(CACHELINE) diff --git a/src/witness.c b/src/witness.c index 940b1eae..6f1a17e7 100644 --- a/src/witness.c +++ b/src/witness.c @@ -1,8 +1,8 @@ #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/witness.h" void witness_init(witness_t *witness, const char *name, witness_rank_t rank,