Make headers self-contained by fixing #includes

Header files are now self-contained, which makes the relationships
between the files clearer, and crucially allows LSP tools like `clangd`
to function correctly in all of our header files. I have verified that
the headers are self-contained (aside from the various Windows shims) by
compiling them as if they were C files – in a follow-up commit I plan to
add this to CI to ensure we don't regress on this front.
This commit is contained in:
Kevin Svetlitski
2023-06-09 17:37:47 -07:00
committed by Qi Wang
parent 856db56f6e
commit 41e0b857be
116 changed files with 277 additions and 38 deletions

View File

@@ -58,14 +58,7 @@ extern "C" {
# include "jemalloc/jemalloc@install_suffix@.h"
# include "jemalloc/internal/jemalloc_internal_defs.h"
# include "jemalloc/internal/jemalloc_internal_macros.h"
static const bool config_debug =
#ifdef JEMALLOC_DEBUG
true
#else
false
#endif
;
# include "jemalloc/internal/jemalloc_preamble.h"
# define JEMALLOC_N(n) @private_namespace@##n
# include "jemalloc/internal/private_namespace.h"

View File

@@ -2,14 +2,6 @@
#define NTHREADS 10
static bool have_dss =
#ifdef JEMALLOC_DSS
true
#else
false
#endif
;
void *
thd_start(void *arg) {
unsigned thread_ind = (unsigned)(uintptr_t)arg;

View File

@@ -1,13 +1,5 @@
#include "test/jemalloc_test.h"
static const bool config_stats =
#ifdef JEMALLOC_STATS
true
#else
false
#endif
;
void *
thd_start(void *arg) {
int err;