mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-26 17:13:35 +03:00
Collapse arena_inlines_a/b and jemalloc_internal_inlines_b into arena_inlines.h
The arena_inlines_a.h / arena_inlines_b.h split, and the parallel
jemalloc_internal_inlines_b.h file that defined arena_choose() between
them, all existed to manage one ordering constraint: arena_choose()
had to be defined before arena_choose_maybe_huge() (which calls it),
but had to be defined after the tsd/tcache inlines it depends on.
Three files, one staged include order, no real semantic boundary.
After the malloc_dispatch refactor moved the heaviest tcache-pulling
inlines (the malloc/dalloc routing) out of arena_inlines_b.h, the
arena-side inlines that remain all belong together. Merge them into
a single arena_inlines.h that:
- explicitly includes jemalloc_internal_inlines_a.h (for tsd
accessors) and tcache.h (for tcache_arena_associate /
reassociate externs) -- both were previously pulled
transitively;
- orders functions so each caller appears after its callee
(cheap accessors -> arena_choose family -> the rest), so no
forward references are needed;
- drops the load-bearing-split comment, which is no longer true.
All consumers that included any of the three old headers now include
arena_inlines.h. background_thread_inlines.h now pulls a heavier set
of transitive includes (prof.h, large.h, mutex.h, ...) than when it
only needed cheap accessors; this is acceptable because every TU that
includes background_thread_inlines.h already pulls those headers via
other paths.
This commit is contained in:
parent
5b834df66c
commit
c411b0ab3b
30 changed files with 159 additions and 203 deletions
|
|
@ -54,10 +54,8 @@ extern "C" {
|
|||
# include "jemalloc/internal/prof.h"
|
||||
# include "jemalloc/internal/background_thread.h"
|
||||
# include "jemalloc/internal/jemalloc_internal_inlines_a.h"
|
||||
# include "jemalloc/internal/arena_inlines_a.h"
|
||||
# include "jemalloc/internal/jemalloc_internal_inlines_b.h"
|
||||
# include "jemalloc/internal/arena_inlines.h"
|
||||
# include "jemalloc/internal/tcache_inlines.h"
|
||||
# include "jemalloc/internal/arena_inlines_b.h"
|
||||
# include "jemalloc/internal/jemalloc_internal_inlines_c.h"
|
||||
# include "jemalloc/internal/prof_inlines.h"
|
||||
# include "jemalloc/internal/background_thread_inlines.h"
|
||||
|
|
@ -112,10 +110,8 @@ extern "C" {
|
|||
# include "jemalloc/internal/prof.h"
|
||||
# include "jemalloc/internal/background_thread.h"
|
||||
# include "jemalloc/internal/jemalloc_internal_inlines_a.h"
|
||||
# include "jemalloc/internal/arena_inlines_a.h"
|
||||
# include "jemalloc/internal/jemalloc_internal_inlines_b.h"
|
||||
# include "jemalloc/internal/arena_inlines.h"
|
||||
# include "jemalloc/internal/tcache_inlines.h"
|
||||
# include "jemalloc/internal/arena_inlines_b.h"
|
||||
# include "jemalloc/internal/jemalloc_internal_inlines_c.h"
|
||||
# include "jemalloc/internal/prof_inlines.h"
|
||||
# include "jemalloc/internal/background_thread_inlines.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue