003 File Manager
Current Path:
/usr/src/contrib/jemalloc/src
usr
/
src
/
contrib
/
jemalloc
/
src
/
📁
..
📄
arena.c
(67.17 KB)
📄
background_thread.c
(27.15 KB)
📄
base.c
(15.17 KB)
📄
bin.c
(2.43 KB)
📄
bitmap.c
(3.12 KB)
📄
ckh.c
(14.37 KB)
📄
ctl.c
(98.71 KB)
📄
div.c
(1.53 KB)
📄
extent.c
(71.71 KB)
📄
extent_dss.c
(6.8 KB)
📄
extent_mmap.c
(933 B)
📄
hash.c
(132 B)
📄
hook.c
(5.61 KB)
📄
jemalloc.c
(102.52 KB)
📄
large.c
(11.54 KB)
📄
log.c
(2.43 KB)
📄
malloc_io.c
(14.71 KB)
📄
mutex.c
(6.04 KB)
📄
mutex_pool.c
(481 B)
📄
nstime.c
(3.42 KB)
📄
pages.c
(15.04 KB)
📄
prng.c
(132 B)
📄
prof.c
(76.28 KB)
📄
rtree.c
(8.58 KB)
📄
safety_check.c
(565 B)
📄
sc.c
(8.24 KB)
📄
stats.c
(47.77 KB)
📄
sz.c
(1.74 KB)
📄
tcache.c
(21.86 KB)
📄
test_hooks.c
(407 B)
📄
ticker.c
(134 B)
📄
tsd.c
(14.24 KB)
📄
witness.c
(2.4 KB)
Editing: witness.c
#define JEMALLOC_WITNESS_C_ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" #include "jemalloc/internal/malloc_io.h" void witness_init(witness_t *witness, const char *name, witness_rank_t rank, witness_comp_t *comp, void *opaque) { witness->name = name; witness->rank = rank; witness->comp = comp; witness->opaque = opaque; } static void witness_lock_error_impl(const witness_list_t *witnesses, const witness_t *witness) { witness_t *w; malloc_printf("<jemalloc>: Lock rank order reversal:"); ql_foreach(w, witnesses, link) { malloc_printf(" %s(%u)", w->name, w->rank); } malloc_printf(" %s(%u)\n", witness->name, witness->rank); abort(); } witness_lock_error_t *JET_MUTABLE witness_lock_error = witness_lock_error_impl; static void witness_owner_error_impl(const witness_t *witness) { malloc_printf("<jemalloc>: Should own %s(%u)\n", witness->name, witness->rank); abort(); } witness_owner_error_t *JET_MUTABLE witness_owner_error = witness_owner_error_impl; static void witness_not_owner_error_impl(const witness_t *witness) { malloc_printf("<jemalloc>: Should not own %s(%u)\n", witness->name, witness->rank); abort(); } witness_not_owner_error_t *JET_MUTABLE witness_not_owner_error = witness_not_owner_error_impl; static void witness_depth_error_impl(const witness_list_t *witnesses, witness_rank_t rank_inclusive, unsigned depth) { witness_t *w; malloc_printf("<jemalloc>: Should own %u lock%s of rank >= %u:", depth, (depth != 1) ? "s" : "", rank_inclusive); ql_foreach(w, witnesses, link) { malloc_printf(" %s(%u)", w->name, w->rank); } malloc_printf("\n"); abort(); } witness_depth_error_t *JET_MUTABLE witness_depth_error = witness_depth_error_impl; void witnesses_cleanup(witness_tsd_t *witness_tsd) { witness_assert_lockless(witness_tsd_tsdn(witness_tsd)); /* Do nothing. */ } void witness_prefork(witness_tsd_t *witness_tsd) { if (!config_debug) { return; } witness_tsd->forking = true; } void witness_postfork_parent(witness_tsd_t *witness_tsd) { if (!config_debug) { return; } witness_tsd->forking = false; } void witness_postfork_child(witness_tsd_t *witness_tsd) { if (!config_debug) { return; } #ifndef JEMALLOC_MUTEX_INIT_CB witness_list_t *witnesses; witnesses = &witness_tsd->witnesses; ql_new(witnesses); #endif witness_tsd->forking = false; }
Upload File
Create Folder