1*8e33eff8Schristos #ifndef JEMALLOC_INTERNAL_INCLUDES_H 2*8e33eff8Schristos #define JEMALLOC_INTERNAL_INCLUDES_H 3*8e33eff8Schristos 4*8e33eff8Schristos /* 5*8e33eff8Schristos * jemalloc can conceptually be broken into components (arena, tcache, etc.), 6*8e33eff8Schristos * but there are circular dependencies that cannot be broken without 7*8e33eff8Schristos * substantial performance degradation. 8*8e33eff8Schristos * 9*8e33eff8Schristos * Historically, we dealt with this by each header into four sections (types, 10*8e33eff8Schristos * structs, externs, and inlines), and included each header file multiple times 11*8e33eff8Schristos * in this file, picking out the portion we want on each pass using the 12*8e33eff8Schristos * following #defines: 13*8e33eff8Schristos * JEMALLOC_H_TYPES : Preprocessor-defined constants and psuedo-opaque data 14*8e33eff8Schristos * types. 15*8e33eff8Schristos * JEMALLOC_H_STRUCTS : Data structures. 16*8e33eff8Schristos * JEMALLOC_H_EXTERNS : Extern data declarations and function prototypes. 17*8e33eff8Schristos * JEMALLOC_H_INLINES : Inline functions. 18*8e33eff8Schristos * 19*8e33eff8Schristos * We're moving toward a world in which the dependencies are explicit; each file 20*8e33eff8Schristos * will #include the headers it depends on (rather than relying on them being 21*8e33eff8Schristos * implicitly available via this file including every header file in the 22*8e33eff8Schristos * project). 23*8e33eff8Schristos * 24*8e33eff8Schristos * We're now in an intermediate state: we've broken up the header files to avoid 25*8e33eff8Schristos * having to include each one multiple times, but have not yet moved the 26*8e33eff8Schristos * dependency information into the header files (i.e. we still rely on the 27*8e33eff8Schristos * ordering in this file to ensure all a header's dependencies are available in 28*8e33eff8Schristos * its translation unit). Each component is now broken up into multiple header 29*8e33eff8Schristos * files, corresponding to the sections above (e.g. instead of "foo.h", we now 30*8e33eff8Schristos * have "foo_types.h", "foo_structs.h", "foo_externs.h", "foo_inlines.h"). 31*8e33eff8Schristos * 32*8e33eff8Schristos * Those files which have been converted to explicitly include their 33*8e33eff8Schristos * inter-component dependencies are now in the initial HERMETIC HEADERS 34*8e33eff8Schristos * section. All headers may still rely on jemalloc_preamble.h (which, by fiat, 35*8e33eff8Schristos * must be included first in every translation unit) for system headers and 36*8e33eff8Schristos * global jemalloc definitions, however. 37*8e33eff8Schristos */ 38*8e33eff8Schristos 39*8e33eff8Schristos /******************************************************************************/ 40*8e33eff8Schristos /* TYPES */ 41*8e33eff8Schristos /******************************************************************************/ 42*8e33eff8Schristos 43*8e33eff8Schristos #include "jemalloc/internal/extent_types.h" 44*8e33eff8Schristos #include "jemalloc/internal/base_types.h" 45*8e33eff8Schristos #include "jemalloc/internal/arena_types.h" 46*8e33eff8Schristos #include "jemalloc/internal/tcache_types.h" 47*8e33eff8Schristos #include "jemalloc/internal/prof_types.h" 48*8e33eff8Schristos 49*8e33eff8Schristos /******************************************************************************/ 50*8e33eff8Schristos /* STRUCTS */ 51*8e33eff8Schristos /******************************************************************************/ 52*8e33eff8Schristos 53*8e33eff8Schristos #include "jemalloc/internal/arena_structs_a.h" 54*8e33eff8Schristos #include "jemalloc/internal/extent_structs.h" 55*8e33eff8Schristos #include "jemalloc/internal/base_structs.h" 56*8e33eff8Schristos #include "jemalloc/internal/prof_structs.h" 57*8e33eff8Schristos #include "jemalloc/internal/arena_structs_b.h" 58*8e33eff8Schristos #include "jemalloc/internal/tcache_structs.h" 59*8e33eff8Schristos #include "jemalloc/internal/background_thread_structs.h" 60*8e33eff8Schristos 61*8e33eff8Schristos /******************************************************************************/ 62*8e33eff8Schristos /* EXTERNS */ 63*8e33eff8Schristos /******************************************************************************/ 64*8e33eff8Schristos 65*8e33eff8Schristos #include "jemalloc/internal/jemalloc_internal_externs.h" 66*8e33eff8Schristos #include "jemalloc/internal/extent_externs.h" 67*8e33eff8Schristos #include "jemalloc/internal/base_externs.h" 68*8e33eff8Schristos #include "jemalloc/internal/arena_externs.h" 69*8e33eff8Schristos #include "jemalloc/internal/large_externs.h" 70*8e33eff8Schristos #include "jemalloc/internal/tcache_externs.h" 71*8e33eff8Schristos #include "jemalloc/internal/prof_externs.h" 72*8e33eff8Schristos #include "jemalloc/internal/background_thread_externs.h" 73*8e33eff8Schristos 74*8e33eff8Schristos /******************************************************************************/ 75*8e33eff8Schristos /* INLINES */ 76*8e33eff8Schristos /******************************************************************************/ 77*8e33eff8Schristos 78*8e33eff8Schristos #include "jemalloc/internal/jemalloc_internal_inlines_a.h" 79*8e33eff8Schristos #include "jemalloc/internal/base_inlines.h" 80*8e33eff8Schristos /* 81*8e33eff8Schristos * Include portions of arena code interleaved with tcache code in order to 82*8e33eff8Schristos * resolve circular dependencies. 83*8e33eff8Schristos */ 84*8e33eff8Schristos #include "jemalloc/internal/prof_inlines_a.h" 85*8e33eff8Schristos #include "jemalloc/internal/arena_inlines_a.h" 86*8e33eff8Schristos #include "jemalloc/internal/extent_inlines.h" 87*8e33eff8Schristos #include "jemalloc/internal/jemalloc_internal_inlines_b.h" 88*8e33eff8Schristos #include "jemalloc/internal/tcache_inlines.h" 89*8e33eff8Schristos #include "jemalloc/internal/arena_inlines_b.h" 90*8e33eff8Schristos #include "jemalloc/internal/jemalloc_internal_inlines_c.h" 91*8e33eff8Schristos #include "jemalloc/internal/prof_inlines_b.h" 92*8e33eff8Schristos #include "jemalloc/internal/background_thread_inlines.h" 93*8e33eff8Schristos 94*8e33eff8Schristos #endif /* JEMALLOC_INTERNAL_INCLUDES_H */ 95