summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index ca86f0459..47cc2586f 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -564,7 +564,7 @@ sub typeFromMagic($@) {
}
sub availableMemory() { sum map { /(\d+)/ } grep { /^(MemTotal|SwapTotal):/ } cat_("/proc/meminfo"); }
-sub availableRamMB() { divide((stat("/proc/kcore"))[7], 1024 * 1024) + 1 }
+sub availableRamMB() { 4 * int ((stat("/proc/kcore"))[7] / 1024 / 1024 / 4 + 0.5) }
sub setVirtual($) {
my $vt = '';