2010-01-17 01:53:50 +08:00
|
|
|
/******************************************************************************/
|
|
|
|
#ifdef JEMALLOC_H_TYPES
|
|
|
|
|
|
|
|
typedef struct extent_node_s extent_node_t;
|
|
|
|
|
|
|
|
#endif /* JEMALLOC_H_TYPES */
|
|
|
|
/******************************************************************************/
|
|
|
|
#ifdef JEMALLOC_H_STRUCTS
|
|
|
|
|
|
|
|
/* Tree of extents. */
|
|
|
|
struct extent_node_s {
|
2010-01-24 18:53:40 +08:00
|
|
|
#if (defined(JEMALLOC_SWAP) || defined(JEMALLOC_DSS))
|
2010-01-17 01:53:50 +08:00
|
|
|
/* Linkage for the size/address-ordered tree. */
|
2010-02-11 02:37:56 +08:00
|
|
|
rb_node(extent_node_t) link_szad;
|
2010-01-17 01:53:50 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Linkage for the address-ordered tree. */
|
2010-02-11 02:37:56 +08:00
|
|
|
rb_node(extent_node_t) link_ad;
|
|
|
|
|
|
|
|
#ifdef JEMALLOC_PROF
|
|
|
|
/* Profile counters, used for huge objects. */
|
2010-04-14 07:13:54 +08:00
|
|
|
prof_ctx_t *prof_ctx;
|
2010-02-11 02:37:56 +08:00
|
|
|
#endif
|
2010-01-17 01:53:50 +08:00
|
|
|
|
|
|
|
/* Pointer to the extent that this tree node is responsible for. */
|
2010-02-11 02:37:56 +08:00
|
|
|
void *addr;
|
2010-01-17 01:53:50 +08:00
|
|
|
|
|
|
|
/* Total region size. */
|
2010-02-11 02:37:56 +08:00
|
|
|
size_t size;
|
2010-01-17 01:53:50 +08:00
|
|
|
};
|
|
|
|
typedef rb_tree(extent_node_t) extent_tree_t;
|
|
|
|
|
|
|
|
#endif /* JEMALLOC_H_STRUCTS */
|
|
|
|
/******************************************************************************/
|
|
|
|
#ifdef JEMALLOC_H_EXTERNS
|
|
|
|
|
2010-01-24 18:53:40 +08:00
|
|
|
#if (defined(JEMALLOC_SWAP) || defined(JEMALLOC_DSS))
|
2010-01-17 01:53:50 +08:00
|
|
|
rb_proto(, extent_tree_szad_, extent_tree_t, extent_node_t)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
rb_proto(, extent_tree_ad_, extent_tree_t, extent_node_t)
|
|
|
|
|
|
|
|
#endif /* JEMALLOC_H_EXTERNS */
|
|
|
|
/******************************************************************************/
|
|
|
|
#ifdef JEMALLOC_H_INLINES
|
|
|
|
|
|
|
|
#endif /* JEMALLOC_H_INLINES */
|
|
|
|
/******************************************************************************/
|
|
|
|
|