Bug 578618 - Remove high_watermark check on maemo > 5. r=dougt
authorOleg Romashin <romaxa@gmail.com>
Tue, 03 Aug 2010 10:44:47 -0700
changeset 48829 cb95b8d67bdd4a07d5c093cb85a1106f9e6574d8
parent 48828 3e77780b80723c718bc1409887c057a626c078a5
child 48830 9a616c369203fc2e09f3e8e57217dce5eb44278c
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersdougt
bugs578618
milestone2.0b3pre
Bug 578618 - Remove high_watermark check on maemo > 5. r=dougt
xpcom/base/nsMemoryImpl.cpp
--- a/xpcom/base/nsMemoryImpl.cpp
+++ b/xpcom/base/nsMemoryImpl.cpp
@@ -53,17 +53,17 @@
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "mozilla/Services.h"
 
 #if defined(XP_WIN)
 #include <windows.h>
 #endif
 
-#if defined(MOZ_PLATFORM_MAEMO) && defined(__arm__)
+#if (MOZ_PLATFORM_MAEMO == 5 || MOZ_PLATFORM_MAEMO == 4) && defined(__arm__)
 #include <fcntl.h>
 #include <unistd.h>
 static const char kHighMark[] = "/sys/kernel/high_watermark";
 #endif
 
 // Some platforms notify you when system memory is low, others do not.
 // In the case of those that do not, we want to post low memory
 // notifications from IsLowMemory().  For those that can notify us, that
@@ -123,17 +123,17 @@ nsMemoryImpl::IsLowMemory(PRBool *result
     // Bug 525323 - GlobalMemoryStatus kills perf on WinCE.
     *result = PR_FALSE;
 #elif defined(XP_WIN)
     MEMORYSTATUSEX stat;
     stat.dwLength = sizeof stat;
     GlobalMemoryStatusEx(&stat);
     *result = (stat.ullAvailPageFile < kRequiredMemory) &&
         ((float)stat.ullAvailPageFile / stat.ullTotalPageFile) < 0.1;
-#elif defined(MOZ_PLATFORM_MAEMO) && defined(__arm__)
+#elif (MOZ_PLATFORM_MAEMO == 5 || MOZ_PLATFORM_MAEMO == 4) && defined(__arm__)
     static int osso_highmark_fd = -1;
     if (osso_highmark_fd == -1) {
         osso_highmark_fd = open (kHighMark, O_RDONLY);
 
         if (osso_highmark_fd == -1) {
             NS_ERROR("can't find the osso highmark file");    
             *result = PR_FALSE;
             return NS_OK;