You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
proxysql/deps/jemalloc/issue2358.patch

21 lines
589 B

@@ -2276,13 +2276,15 @@
/*
* Avoid a prof_active check on the fastpath.
* If prof_active is false, set bytes_until_sample to
- * a large value. If prof_active is set to true,
+ * a sampling interval. If prof_active is set to true,
* bytes_until_sample will be reset.
*/
- if (!prof_active) {
- tsd_bytes_until_sample_set(tsd, SSIZE_MAX);
+ if (!prof_active_get_unlocked()) {
+ tsd_bytes_until_sample_set(tsd,
+ ((uint64_t)1U << lg_prof_sample));
+ } else {
+ return malloc_default(size);
}
- return malloc_default(size);
}
}