Header refactoring: break out rb.h dependencies

This commit is contained in:
David Goldblatt 2017-04-10 17:03:25 -07:00 committed by David Goldblatt
parent 2f00ce4da7
commit 63a5cd4cc2
4 changed files with 8 additions and 4 deletions

View File

@ -180,10 +180,6 @@ static const bool have_percpu_arena =
#include <mach/vm_map.h> #include <mach/vm_map.h>
#endif #endif
#ifndef __PGI
#define RB_COMPACT
#endif
#include "jemalloc/internal/rb.h"
#include "jemalloc/internal/qr.h" #include "jemalloc/internal/qr.h"
#include "jemalloc/internal/ql.h" #include "jemalloc/internal/ql.h"

View File

@ -1,6 +1,8 @@
#ifndef JEMALLOC_INTERNAL_PROF_STRUCTS_H #ifndef JEMALLOC_INTERNAL_PROF_STRUCTS_H
#define JEMALLOC_INTERNAL_PROF_STRUCTS_H #define JEMALLOC_INTERNAL_PROF_STRUCTS_H
#include "jemalloc/internal/rb.h"
struct prof_bt_s { struct prof_bt_s {
/* Backtrace, stored as len program counters. */ /* Backtrace, stored as len program counters. */
void **vec; void **vec;

View File

@ -22,6 +22,10 @@
#ifndef RB_H_ #ifndef RB_H_
#define RB_H_ #define RB_H_
#ifndef __PGI
#define RB_COMPACT
#endif
#ifdef RB_COMPACT #ifdef RB_COMPACT
/* Node structure. */ /* Node structure. */
#define rb_node(a_type) \ #define rb_node(a_type) \

View File

@ -1,5 +1,7 @@
#include "test/jemalloc_test.h" #include "test/jemalloc_test.h"
#include "jemalloc/internal/rb.h"
#define rbtn_black_height(a_type, a_field, a_rbt, r_height) do { \ #define rbtn_black_height(a_type, a_field, a_rbt, r_height) do { \
a_type *rbp_bh_t; \ a_type *rbp_bh_t; \
for (rbp_bh_t = (a_rbt)->rbt_root, (r_height) = 0; rbp_bh_t != \ for (rbp_bh_t = (a_rbt)->rbt_root, (r_height) = 0; rbp_bh_t != \