Blame jemalloc/include/jemalloc/internal/jemalloc_internal_includes.h

Packit 345191
#ifndef JEMALLOC_INTERNAL_INCLUDES_H
Packit 345191
#define JEMALLOC_INTERNAL_INCLUDES_H
Packit 345191
Packit 345191
/*
Packit 345191
 * jemalloc can conceptually be broken into components (arena, tcache, etc.),
Packit 345191
 * but there are circular dependencies that cannot be broken without
Packit 345191
 * substantial performance degradation.
Packit 345191
 *
Packit 345191
 * Historically, we dealt with this by each header into four sections (types,
Packit 345191
 * structs, externs, and inlines), and included each header file multiple times
Packit 345191
 * in this file, picking out the portion we want on each pass using the
Packit 345191
 * following #defines:
Packit 345191
 *   JEMALLOC_H_TYPES   : Preprocessor-defined constants and psuedo-opaque data
Packit 345191
 *                        types.
Packit 345191
 *   JEMALLOC_H_STRUCTS : Data structures.
Packit 345191
 *   JEMALLOC_H_EXTERNS : Extern data declarations and function prototypes.
Packit 345191
 *   JEMALLOC_H_INLINES : Inline functions.
Packit 345191
 *
Packit 345191
 * We're moving toward a world in which the dependencies are explicit; each file
Packit 345191
 * will #include the headers it depends on (rather than relying on them being
Packit 345191
 * implicitly available via this file including every header file in the
Packit 345191
 * project).
Packit 345191
 *
Packit 345191
 * We're now in an intermediate state: we've broken up the header files to avoid
Packit 345191
 * having to include each one multiple times, but have not yet moved the
Packit 345191
 * dependency information into the header files (i.e. we still rely on the
Packit 345191
 * ordering in this file to ensure all a header's dependencies are available in
Packit 345191
 * its translation unit).  Each component is now broken up into multiple header
Packit 345191
 * files, corresponding to the sections above (e.g. instead of "foo.h", we now
Packit 345191
 * have "foo_types.h", "foo_structs.h", "foo_externs.h", "foo_inlines.h").
Packit 345191
 *
Packit 345191
 * Those files which have been converted to explicitly include their
Packit 345191
 * inter-component dependencies are now in the initial HERMETIC HEADERS
Packit 345191
 * section.  All headers may still rely on jemalloc_preamble.h (which, by fiat,
Packit 345191
 * must be included first in every translation unit) for system headers and
Packit 345191
 * global jemalloc definitions, however.
Packit 345191
 */
Packit 345191
Packit 345191
/******************************************************************************/
Packit 345191
/* TYPES */
Packit 345191
/******************************************************************************/
Packit 345191
Packit 345191
#include "jemalloc/internal/extent_types.h"
Packit 345191
#include "jemalloc/internal/base_types.h"
Packit 345191
#include "jemalloc/internal/arena_types.h"
Packit 345191
#include "jemalloc/internal/tcache_types.h"
Packit 345191
#include "jemalloc/internal/prof_types.h"
Packit 345191
Packit 345191
/******************************************************************************/
Packit 345191
/* STRUCTS */
Packit 345191
/******************************************************************************/
Packit 345191
Packit 345191
#include "jemalloc/internal/arena_structs_a.h"
Packit 345191
#include "jemalloc/internal/extent_structs.h"
Packit 345191
#include "jemalloc/internal/base_structs.h"
Packit 345191
#include "jemalloc/internal/prof_structs.h"
Packit 345191
#include "jemalloc/internal/arena_structs_b.h"
Packit 345191
#include "jemalloc/internal/tcache_structs.h"
Packit 345191
#include "jemalloc/internal/background_thread_structs.h"
Packit 345191
Packit 345191
/******************************************************************************/
Packit 345191
/* EXTERNS */
Packit 345191
/******************************************************************************/
Packit 345191
Packit 345191
#include "jemalloc/internal/jemalloc_internal_externs.h"
Packit 345191
#include "jemalloc/internal/extent_externs.h"
Packit 345191
#include "jemalloc/internal/base_externs.h"
Packit 345191
#include "jemalloc/internal/arena_externs.h"
Packit 345191
#include "jemalloc/internal/large_externs.h"
Packit 345191
#include "jemalloc/internal/tcache_externs.h"
Packit 345191
#include "jemalloc/internal/prof_externs.h"
Packit 345191
#include "jemalloc/internal/background_thread_externs.h"
Packit 345191
Packit 345191
/******************************************************************************/
Packit 345191
/* INLINES */
Packit 345191
/******************************************************************************/
Packit 345191
Packit 345191
#include "jemalloc/internal/jemalloc_internal_inlines_a.h"
Packit 345191
#include "jemalloc/internal/base_inlines.h"
Packit 345191
/*
Packit 345191
 * Include portions of arena code interleaved with tcache code in order to
Packit 345191
 * resolve circular dependencies.
Packit 345191
 */
Packit 345191
#include "jemalloc/internal/prof_inlines_a.h"
Packit 345191
#include "jemalloc/internal/arena_inlines_a.h"
Packit 345191
#include "jemalloc/internal/extent_inlines.h"
Packit 345191
#include "jemalloc/internal/jemalloc_internal_inlines_b.h"
Packit 345191
#include "jemalloc/internal/tcache_inlines.h"
Packit 345191
#include "jemalloc/internal/arena_inlines_b.h"
Packit 345191
#include "jemalloc/internal/jemalloc_internal_inlines_c.h"
Packit 345191
#include "jemalloc/internal/prof_inlines_b.h"
Packit 345191
#include "jemalloc/internal/background_thread_inlines.h"
Packit 345191
Packit 345191
#endif /* JEMALLOC_INTERNAL_INCLUDES_H */