Apply density variation on the whole placement area, avoiding reduced free space under huge bloat
This commit is contained in:
parent
7b155d1ecf
commit
e084c1e672
|
@ -845,9 +845,8 @@ namespace Etesian {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute the space margin from the row length computed earlier
|
// Compute the space margin from the row length computed earlier
|
||||||
double spaceMargin = (double) (totalLength - usedLength) / usedLength;
|
double spaceFactor = (1.0 - getDensityVariation()) * totalLength / usedLength;
|
||||||
double densityVariation = getDensityVariation();
|
double bloatFactor = std::max(1.0, spaceFactor);
|
||||||
double bloatFactor = 1.0 + std::max(spaceMargin - densityVariation, 0.0);
|
|
||||||
if (bloatFactor != 1.0) {
|
if (bloatFactor != 1.0) {
|
||||||
ostringstream bf;
|
ostringstream bf;
|
||||||
bf << fixed << setprecision(2) << bloatFactor << "%";
|
bf << fixed << setprecision(2) << bloatFactor << "%";
|
||||||
|
|
Loading…
Reference in New Issue