Remove the "opt.valgrind" mallctl.
Remove the "opt.valgrind" mallctl because it is unnecessary -- jemalloc automatically detects whether it is running inside valgrind.
This commit is contained in:
@@ -377,12 +377,12 @@ static const bool config_ivsalloc =
|
||||
* usable space.
|
||||
*/
|
||||
#define JEMALLOC_VALGRIND_MALLOC(cond, ptr, usize, zero) do { \
|
||||
if (config_valgrind && opt_valgrind && cond) \
|
||||
if (config_valgrind && in_valgrind && cond) \
|
||||
VALGRIND_MALLOCLIKE_BLOCK(ptr, usize, p2rz(ptr), zero); \
|
||||
} while (0)
|
||||
#define JEMALLOC_VALGRIND_REALLOC(ptr, usize, old_ptr, old_usize, \
|
||||
old_rzsize, zero) do { \
|
||||
if (config_valgrind && opt_valgrind) { \
|
||||
if (config_valgrind && in_valgrind) { \
|
||||
size_t rzsize = p2rz(ptr); \
|
||||
\
|
||||
if (ptr == old_ptr) { \
|
||||
@@ -418,7 +418,7 @@ static const bool config_ivsalloc =
|
||||
} \
|
||||
} while (0)
|
||||
#define JEMALLOC_VALGRIND_FREE(ptr, rzsize) do { \
|
||||
if (config_valgrind && opt_valgrind) \
|
||||
if (config_valgrind && in_valgrind) \
|
||||
VALGRIND_FREELIKE_BLOCK(ptr, rzsize); \
|
||||
} while (0)
|
||||
#else
|
||||
@@ -504,11 +504,12 @@ extern bool opt_junk;
|
||||
extern size_t opt_quarantine;
|
||||
extern bool opt_redzone;
|
||||
extern bool opt_utrace;
|
||||
extern bool opt_valgrind;
|
||||
extern bool opt_xmalloc;
|
||||
extern bool opt_zero;
|
||||
extern size_t opt_narenas;
|
||||
|
||||
extern bool in_valgrind;
|
||||
|
||||
/* Number of CPUs. */
|
||||
extern unsigned ncpus;
|
||||
|
||||
|
@@ -217,6 +217,7 @@ idalloc
|
||||
idalloct
|
||||
imalloc
|
||||
imalloct
|
||||
in_valgrind
|
||||
ipalloc
|
||||
ipalloct
|
||||
iqalloc
|
||||
@@ -278,7 +279,6 @@ opt_redzone
|
||||
opt_stats_print
|
||||
opt_tcache
|
||||
opt_utrace
|
||||
opt_valgrind
|
||||
opt_xmalloc
|
||||
opt_zero
|
||||
p2rz
|
||||
|
Reference in New Issue
Block a user