From c6e950665c0566934b8b058ea11fc44cdcfee3ce Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Sun, 3 Oct 2010 00:10:15 -0700 Subject: Increase PRN 'a' and 'c' constants. Increase PRN 'a' and 'c' constants, so that high bits tend to cascade more. --- jemalloc/include/jemalloc/internal/ckh.h | 2 +- jemalloc/src/prof.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jemalloc/include/jemalloc/internal/ckh.h b/jemalloc/include/jemalloc/internal/ckh.h index c39ea5c..d4e391b 100644 --- a/jemalloc/include/jemalloc/internal/ckh.h +++ b/jemalloc/include/jemalloc/internal/ckh.h @@ -45,7 +45,7 @@ struct ckh_s { #endif /* Used for pseudo-random number generation. */ -#define CKH_A 12345 +#define CKH_A 1103515241 #define CKH_C 12347 uint32_t prn_state; diff --git a/jemalloc/src/prof.c b/jemalloc/src/prof.c index 783a83d..e715da9 100644 --- a/jemalloc/src/prof.c +++ b/jemalloc/src/prof.c @@ -644,7 +644,7 @@ prof_sample_threshold_update(void) */ PROF_SAMPLE_STATE_GET(prof_sample_state); prn64(r, 53, prof_sample_state->prn_state, - (uint64_t)1125899906842625LLU, 1058392653243283975); + (uint64_t)6364136223846793005LLU, (uint64_t)1442695040888963407LLU); u = (double)r * (1.0/9007199254740992.0L); prof_sample_state->threshold = (uint64_t)(log(u) / log(1.0 - (1.0 / (double)((uint64_t)1U << opt_lg_prof_sample)))) -- cgit v0.12