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.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index b3a6b05e5..2232048f6 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -571,7 +571,13 @@ sub typeFromMagic($@) {
}
sub availableMemory() { sum map { /(\d+)/ } grep { /^(MemTotal|SwapTotal):/ } cat_("/proc/meminfo"); }
-sub availableRamMB() { 4 * int ((stat("/proc/kcore"))[7] / 1024 / 1024 / 4 + 0.5) }
+sub availableRamMB() {
+ my $s = 4 * int ((stat("/proc/kcore"))[7] / 1024 / 1024 / 4 + 0.5);
+ #- HACK HACK: if i810 and memsize
+ require detect_devices;
+ return $s - 1 if $s == 128 && grep { $_->{driver} =~ /i810/ } detect_devices::probeall();
+ $s;
+}
sub setVirtual($) {
my $vt = '';