Commit 8dc48c62 authored by jar@chromium.org's avatar jar@chromium.org

Fixing tree (using smaller prime than 2^31)

TBR=rtenneti
Review URL: http://codereview.chromium.org/8793003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112930 0039d316-1c4b-4281-b951-d872f2087c98
parent e8a57dc2
...@@ -342,7 +342,7 @@ void ThreadData::TallyADeath(const Births& birth, ...@@ -342,7 +342,7 @@ void ThreadData::TallyADeath(const Births& birth,
DurationInt queue_duration, DurationInt queue_duration,
DurationInt run_duration) { DurationInt run_duration) {
// Stir in some randomness, plus add constant in case durations are zero. // Stir in some randomness, plus add constant in case durations are zero.
const DurationInt kSomePrimeNumber = 4294967279; const DurationInt kSomePrimeNumber = 5939; // To big is 4294967279;
random_number_ += queue_duration + run_duration + kSomePrimeNumber; random_number_ += queue_duration + run_duration + kSomePrimeNumber;
// An address is going to have some randomness to it as well ;-). // An address is going to have some randomness to it as well ;-).
random_number_ ^= static_cast<int32>(&birth - reinterpret_cast<Births*>(0)); random_number_ ^= static_cast<int32>(&birth - reinterpret_cast<Births*>(0));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment