mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 17:31:13 +08:00
From Craig Silverstein: implement --hash-bucket-empty-fraction for real.
This commit is contained in:
@ -698,9 +698,11 @@ Dynobj::compute_bucket_count(const std::vector<uint32_t>& hashcodes,
|
|||||||
|
|
||||||
unsigned int symcount = hashcodes.size();
|
unsigned int symcount = hashcodes.size();
|
||||||
unsigned int ret = 1;
|
unsigned int ret = 1;
|
||||||
|
const double full_fraction
|
||||||
|
= 1.0 - parameters->options().hash_bucket_empty_fraction();
|
||||||
for (int i = 0; i < buckets_count; ++i)
|
for (int i = 0; i < buckets_count; ++i)
|
||||||
{
|
{
|
||||||
if (symcount < buckets[i])
|
if (symcount < buckets[i] * full_fraction)
|
||||||
break;
|
break;
|
||||||
ret = buckets[i];
|
ret = buckets[i];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user