summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Goldblatt <davidgoldblatt@fb.com>2017-04-11 00:03:25 (GMT)
committerDavid Goldblatt <davidtgoldblatt@gmail.com>2017-04-11 18:52:30 (GMT)
commit63a5cd4cc2a4812adc7f3a8bd3ea0633115b151e (patch)
treea3e11962697410181749539b89ee711d2dbec169
parent2f00ce4da7b1c360a9b1129ebcdb087da562e2d4 (diff)
downloadjemalloc-63a5cd4cc2a4812adc7f3a8bd3ea0633115b151e.zip
jemalloc-63a5cd4cc2a4812adc7f3a8bd3ea0633115b151e.tar.gz
jemalloc-63a5cd4cc2a4812adc7f3a8bd3ea0633115b151e.tar.bz2
Header refactoring: break out rb.h dependencies
-rw-r--r--include/jemalloc/internal/jemalloc_internal.h.in4
-rw-r--r--include/jemalloc/internal/prof_structs.h2
-rw-r--r--include/jemalloc/internal/rb.h4
-rw-r--r--test/unit/rb.c2
4 files changed, 8 insertions, 4 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in
index 7756b8f..532af2b 100644
--- a/include/jemalloc/internal/jemalloc_internal.h.in
+++ b/include/jemalloc/internal/jemalloc_internal.h.in
@@ -180,10 +180,6 @@ static const bool have_percpu_arena =
#include <mach/vm_map.h>
#endif
-#ifndef __PGI
-#define RB_COMPACT
-#endif
-#include "jemalloc/internal/rb.h"
#include "jemalloc/internal/qr.h"
#include "jemalloc/internal/ql.h"
diff --git a/include/jemalloc/internal/prof_structs.h b/include/jemalloc/internal/prof_structs.h
index fba8c29..e193676 100644
--- a/include/jemalloc/internal/prof_structs.h
+++ b/include/jemalloc/internal/prof_structs.h
@@ -1,6 +1,8 @@
#ifndef JEMALLOC_INTERNAL_PROF_STRUCTS_H
#define JEMALLOC_INTERNAL_PROF_STRUCTS_H
+#include "jemalloc/internal/rb.h"
+
struct prof_bt_s {
/* Backtrace, stored as len program counters. */
void **vec;
diff --git a/include/jemalloc/internal/rb.h b/include/jemalloc/internal/rb.h
index aa76061..47fa5ca 100644
--- a/include/jemalloc/internal/rb.h
+++ b/include/jemalloc/internal/rb.h
@@ -22,6 +22,10 @@
#ifndef RB_H_
#define RB_H_
+#ifndef __PGI
+#define RB_COMPACT
+#endif
+
#ifdef RB_COMPACT
/* Node structure. */
#define rb_node(a_type) \
diff --git a/test/unit/rb.c b/test/unit/rb.c
index 0bcc3c3..65c0492 100644
--- a/test/unit/rb.c
+++ b/test/unit/rb.c
@@ -1,5 +1,7 @@
#include "test/jemalloc_test.h"
+#include "jemalloc/internal/rb.h"
+
#define rbtn_black_height(a_type, a_field, a_rbt, r_height) do { \
a_type *rbp_bh_t; \
for (rbp_bh_t = (a_rbt)->rbt_root, (r_height) = 0; rbp_bh_t != \