summaryrefslogtreecommitdiffstats
path: root/jemalloc/include
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2010-04-14 22:07:37 (GMT)
committerJason Evans <jasone@canonware.com>2010-04-14 22:07:37 (GMT)
commit1af6ac42e303f229d5e8bb38252b1fb7371081b2 (patch)
tree0199eb3067af365c1c5268a49cf4b76d7efd2e15 /jemalloc/include
parent552339916925c5432e51ab78864fe63edba9298d (diff)
parent5055f4516c8852e67668b0e746863a7d6a1c148e (diff)
downloadjemalloc-1.0.1.zip
jemalloc-1.0.1.tar.gz
jemalloc-1.0.1.tar.bz2
Merge branch 'dev'1.0.1
Diffstat (limited to 'jemalloc/include')
-rw-r--r--jemalloc/include/jemalloc/internal/arena.h10
-rw-r--r--jemalloc/include/jemalloc/internal/extent.h2
-rw-r--r--jemalloc/include/jemalloc/internal/huge.h4
-rw-r--r--jemalloc/include/jemalloc/internal/prof.h7
-rw-r--r--jemalloc/include/jemalloc/internal/tcache.h2
5 files changed, 14 insertions, 11 deletions
diff --git a/jemalloc/include/jemalloc/internal/arena.h b/jemalloc/include/jemalloc/internal/arena.h
index bb4ce2a..c1955f1 100644
--- a/jemalloc/include/jemalloc/internal/arena.h
+++ b/jemalloc/include/jemalloc/internal/arena.h
@@ -98,7 +98,7 @@ struct arena_chunk_map_s {
#ifdef JEMALLOC_PROF
/* Profile counters, used for large object runs. */
- prof_thr_cnt_t *prof_cnt;
+ prof_ctx_t *prof_ctx;
#endif
/*
@@ -246,10 +246,10 @@ struct arena_bin_s {
#ifdef JEMALLOC_PROF
/*
- * Offset of first (prof_cnt_t *) in a run header for this bin's size
+ * Offset of first (prof_ctx_t *) in a run header for this bin's size
* class, or 0 if (opt_prof == false).
*/
- uint32_t cnt0_offset;
+ uint32_t ctx0_offset;
#endif
/* Offset of first region in a run for this bin's size class. */
@@ -438,8 +438,8 @@ size_t arena_salloc(const void *ptr);
#ifdef JEMALLOC_PROF
void arena_prof_promoted(const void *ptr, size_t size);
size_t arena_salloc_demote(const void *ptr);
-prof_thr_cnt_t *arena_prof_cnt_get(const void *ptr);
-void arena_prof_cnt_set(const void *ptr, prof_thr_cnt_t *cnt);
+prof_ctx_t *arena_prof_ctx_get(const void *ptr);
+void arena_prof_ctx_set(const void *ptr, prof_ctx_t *ctx);
#endif
void arena_dalloc_bin(arena_t *arena, arena_chunk_t *chunk, void *ptr,
arena_chunk_map_t *mapelm);
diff --git a/jemalloc/include/jemalloc/internal/extent.h b/jemalloc/include/jemalloc/internal/extent.h
index 33a4e9a..6fe9702 100644
--- a/jemalloc/include/jemalloc/internal/extent.h
+++ b/jemalloc/include/jemalloc/internal/extent.h
@@ -19,7 +19,7 @@ struct extent_node_s {
#ifdef JEMALLOC_PROF
/* Profile counters, used for huge objects. */
- prof_thr_cnt_t *prof_cnt;
+ prof_ctx_t *prof_ctx;
#endif
/* Pointer to the extent that this tree node is responsible for. */
diff --git a/jemalloc/include/jemalloc/internal/huge.h b/jemalloc/include/jemalloc/internal/huge.h
index 3cf32f7..0c0582f 100644
--- a/jemalloc/include/jemalloc/internal/huge.h
+++ b/jemalloc/include/jemalloc/internal/huge.h
@@ -25,8 +25,8 @@ void *huge_ralloc(void *ptr, size_t size, size_t oldsize);
void huge_dalloc(void *ptr);
size_t huge_salloc(const void *ptr);
#ifdef JEMALLOC_PROF
-prof_thr_cnt_t *huge_prof_cnt_get(const void *ptr);
-void huge_prof_cnt_set(const void *ptr, prof_thr_cnt_t *cnt);
+prof_ctx_t *huge_prof_ctx_get(const void *ptr);
+void huge_prof_ctx_set(const void *ptr, prof_ctx_t *ctx);
#endif
bool huge_boot(void);
diff --git a/jemalloc/include/jemalloc/internal/prof.h b/jemalloc/include/jemalloc/internal/prof.h
index 6e71552..fb55fb9 100644
--- a/jemalloc/include/jemalloc/internal/prof.h
+++ b/jemalloc/include/jemalloc/internal/prof.h
@@ -98,6 +98,9 @@ struct prof_thr_cnt_s {
};
struct prof_ctx_s {
+ /* Associated backtrace. */
+ prof_bt_t *bt;
+
/* Protects cnt_merged and sets_ql. */
malloc_mutex_t lock;
@@ -151,10 +154,10 @@ bool prof_init(prof_t *prof, bool master);
void prof_destroy(prof_t *prof);
prof_thr_cnt_t *prof_alloc_prep(size_t size);
-prof_thr_cnt_t *prof_cnt_get(const void *ptr);
+prof_ctx_t *prof_ctx_get(const void *ptr);
void prof_malloc(const void *ptr, prof_thr_cnt_t *cnt);
void prof_realloc(const void *ptr, prof_thr_cnt_t *cnt, const void *old_ptr,
- size_t old_size, prof_thr_cnt_t *old_cnt);
+ size_t old_size, prof_ctx_t *old_ctx);
void prof_free(const void *ptr);
void prof_idump(void);
bool prof_mdump(const char *filename);
diff --git a/jemalloc/include/jemalloc/internal/tcache.h b/jemalloc/include/jemalloc/internal/tcache.h
index c76597f..fa6c53f 100644
--- a/jemalloc/include/jemalloc/internal/tcache.h
+++ b/jemalloc/include/jemalloc/internal/tcache.h
@@ -353,7 +353,7 @@ tcache_dalloc_large(tcache_t *tcache, void *ptr, size_t size)
#ifdef JEMALLOC_FILL
if (opt_junk)
- memset(ptr, 0x5a, bin->reg_size);
+ memset(ptr, 0x5a, arena->bins[binind].reg_size);
#endif
tbin = &tcache->tbins[binind];