Clarify.
This commit is contained in:
parent
35e859e66e
commit
617d6d018c
@ -141,16 +141,16 @@ EraseDiskPage::doAutopartition( Device* dev )
|
|||||||
|
|
||||||
// If there is enough room for ESP + root + swap, create swap, otherwise don't.
|
// If there is enough room for ESP + root + swap, create swap, otherwise don't.
|
||||||
// Physical memory Swap
|
// Physical memory Swap
|
||||||
// <4 GiB 2 * memory (min. 2 GiB) + overprovisioning
|
// <4 GiB 2 * memory (min. 2 GiB) + overallocation
|
||||||
// 4-8 GiB 8 GiB + overprovisioning
|
// 4-8 GiB 8 GiB + overallocation
|
||||||
// >8 GiB = memory + overprovisioning
|
// >8 GiB = memory + overallocation
|
||||||
qint64 suggestedSwapSizeB = 0;
|
qint64 suggestedSwapSizeB = 0;
|
||||||
qint64 availableRamB = CalamaresUtils::getPhysicalMemoryB();
|
qint64 availableRamB = CalamaresUtils::getPhysicalMemoryB();
|
||||||
qreal overprovisionFactor = 1.01;
|
qreal overestimationFactor = 1.01;
|
||||||
if ( !availableRamB )
|
if ( !availableRamB )
|
||||||
{
|
{
|
||||||
availableRamB = CalamaresUtils::getTotalMemoryB();
|
availableRamB = CalamaresUtils::getTotalMemoryB();
|
||||||
overprovisionFactor = 1.10;
|
overestimationFactor = 1.10;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( availableRamB < 4 GiB )
|
if ( availableRamB < 4 GiB )
|
||||||
@ -160,7 +160,7 @@ EraseDiskPage::doAutopartition( Device* dev )
|
|||||||
else
|
else
|
||||||
suggestedSwapSizeB = availableRamB;
|
suggestedSwapSizeB = availableRamB;
|
||||||
|
|
||||||
suggestedSwapSizeB *= overprovisionFactor;
|
suggestedSwapSizeB *= overestimationFactor;
|
||||||
|
|
||||||
cDebug() << "Suggested swap size:" << suggestedSwapSizeB / 1024. / 1024. /1024. << "GiB";
|
cDebug() << "Suggested swap size:" << suggestedSwapSizeB / 1024. / 1024. /1024. << "GiB";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user