diff options
author | Jason Evans <je@fb.com> | 2016-02-10 00:28:40 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-02-20 04:29:06 (GMT) |
commit | 34676d33690f6cc6885ff769e537ca940aacf886 (patch) | |
tree | 9cb1c620c553becca5c7f40641c00ec31d65094a /src/prof.c | |
parent | c87ab25d189e0ae76fd568db4bf273e2788cf1a9 (diff) | |
download | jemalloc-34676d33690f6cc6885ff769e537ca940aacf886.zip jemalloc-34676d33690f6cc6885ff769e537ca940aacf886.tar.gz jemalloc-34676d33690f6cc6885ff769e537ca940aacf886.tar.bz2 |
Refactor prng* from cpp macros into inline functions.
Remove 32-bit variant, convert prng64() to prng_lg_range(), and add
prng_range().
Diffstat (limited to 'src/prof.c')
-rw-r--r-- | src/prof.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -871,8 +871,7 @@ prof_sample_threshold_update(prof_tdata_t *tdata) * pp 500 * (http://luc.devroye.org/rnbookindex.html) */ - prng64(r, 53, tdata->prng_state, UINT64_C(6364136223846793005), - UINT64_C(1442695040888963407)); + r = prng_lg_range(&tdata->prng_state, 53); u = (double)r * (1.0/9007199254740992.0L); tdata->bytes_until_sample = (uint64_t)(log(u) / log(1.0 - (1.0 / (double)((uint64_t)1U << lg_prof_sample)))) |