Bug 1390253 - Increase RAM threshold for automatic 64-bit installation. r=rstrong, a=gchang
authorMatt Howell <mhowell@mozilla.com>
Mon, 14 Aug 2017 13:14:01 -0700
changeset 423599 2f22606fa551e802fb6a6f4fdbf8fb8367467679
parent 423598 ec091dee71a261abc7d8b91f1213eca6686f5356
child 423600 544103c9f35907b80f8f024f29f9058ebe868065
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong, gchang
bugs1390253
milestone56.0
Bug 1390253 - Increase RAM threshold for automatic 64-bit installation. r=rstrong, a=gchang MozReview-Commit-ID: 1IDedw68lF6
browser/installer/windows/nsis/stub.nsi
--- a/browser/installer/windows/nsis/stub.nsi
+++ b/browser/installer/windows/nsis/stub.nsi
@@ -176,23 +176,19 @@ Var PreviousInstallArch
 ; with a 100 millisecond timer and a first step of 20 as defined by
 ; InstallProgressFirstStep .
 !define /math InstallPaveOverTotalSteps ${InstallProgressFirstStep} + 1800
 
 ; Blurb duty cycle
 !define BlurbDisplayMS 19500
 !define BlurbBlankMS 500
 
-; Amount of physical memory required for the 64-bit build to be selected.
-; Machines with less RAM than this get the 32-bit build, even with a 64-bit OS.
-; The value 1800 MB was chosen based on an initial requirement of 2 GB, reduced
-; to allow for hardware such as integrated graphics that reserves some of the
-; installed RAM for its own use.
-; 1800 MB * 1024 KB/MB * 1024 B/KB = 1887436800 bytes
-!define RAM_NEEDED_FOR_64BIT 1887436800
+; Amount of physical memory required for the 64-bit build to be selected (2 GB).
+; Machines with this or less RAM get the 32-bit build, even with a 64-bit OS.
+!define RAM_NEEDED_FOR_64BIT 0x80000000
 
 ; Attempt to elevate Standard Users in addition to users that
 ; are a member of the Administrators group.
 !define NONADMIN_ELEVATE
 
 !define CONFIG_INI "config.ini"
 
 !ifndef FILE_SHARE_READ
@@ -322,17 +318,17 @@ Function .onInit
 
   ; Check if we meet the RAM requirement for the 64-bit build.
   System::Call "*(i 64, i, l 0, l, l, l, l, l, l)p.r0"
   System::Call "Kernel32::GlobalMemoryStatusEx(p r0)"
   System::Call "*$0(i, i, l.r1, l, l, l, l, l, l)"
   System::Free $0
 
   ${If} ${RunningX64}
-  ${AndIf} $1 L>= ${RAM_NEEDED_FOR_64BIT}
+  ${AndIf} $1 L> ${RAM_NEEDED_FOR_64BIT}
     StrCpy $DroplistArch "$(VERSION_64BIT)"
     StrCpy $INSTDIR "${DefaultInstDir64bit}"
   ${Else}
     StrCpy $DroplistArch "$(VERSION_32BIT)"
     StrCpy $INSTDIR "${DefaultInstDir32bit}"
   ${EndIf}
 
   ; Require elevation if the user can elevate