summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 350591534..3bf3c7e0f 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -577,7 +577,7 @@ sub typeFromMagic($@) {
sub availableMemory() { sum map { /(\d+)/ } grep { /^(MemTotal|SwapTotal):/ } cat_("/proc/meminfo"); }
sub availableRamMB() {
- my $s = 4 * int ((stat("/proc/kcore"))[7] / 1024 / 1024 / 4 + 0.5);
+ my $s = 4 * round((-s '/proc/kcore') / 1024 / 1024 / 4);
#- HACK HACK: if i810 and memsize
require detect_devices;
return $s - 1 if $s == 128 && grep { $_->{driver} =~ /i810/ } detect_devices::probeall();