diff options
author | raczman <none@none> | 2010-04-20 10:58:41 +0200 |
---|---|---|
committer | raczman <none@none> | 2010-04-20 10:58:41 +0200 |
commit | 1532a2f9a2b227e0011a81959403a3b0b05153ba (patch) | |
tree | 293e9bea38c5caee2fcef1c8cc1fcf38b505ece9 /dep/include/jemalloc/internal/extent.h | |
parent | b34e2bdb1c988450d9737d7565f9d357edff4dc7 (diff) |
Use jemalloc as memory allocator on linux.
In comparison to standard glibc allocator,
jemalloc fargments adress space less,
and scales linearly in multithreaded environment.
Author: Jason Evans, mad props to him.
--HG--
branch : trunk
Diffstat (limited to 'dep/include/jemalloc/internal/extent.h')
-rw-r--r-- | dep/include/jemalloc/internal/extent.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/dep/include/jemalloc/internal/extent.h b/dep/include/jemalloc/internal/extent.h new file mode 100644 index 00000000000..33a4e9a3852 --- /dev/null +++ b/dep/include/jemalloc/internal/extent.h @@ -0,0 +1,49 @@ +/******************************************************************************/ +#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 { +#if (defined(JEMALLOC_SWAP) || defined(JEMALLOC_DSS)) + /* Linkage for the size/address-ordered tree. */ + rb_node(extent_node_t) link_szad; +#endif + + /* Linkage for the address-ordered tree. */ + rb_node(extent_node_t) link_ad; + +#ifdef JEMALLOC_PROF + /* Profile counters, used for huge objects. */ + prof_thr_cnt_t *prof_cnt; +#endif + + /* Pointer to the extent that this tree node is responsible for. */ + void *addr; + + /* Total region size. */ + size_t size; +}; +typedef rb_tree(extent_node_t) extent_tree_t; + +#endif /* JEMALLOC_H_STRUCTS */ +/******************************************************************************/ +#ifdef JEMALLOC_H_EXTERNS + +#if (defined(JEMALLOC_SWAP) || defined(JEMALLOC_DSS)) +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 */ +/******************************************************************************/ + |