Index: linuxinfo-1.1.8-42/linuxinfo_common.c
===================================================================
--- linuxinfo-1.1.8-42.orig/linuxinfo_common.c	2013-05-28 19:50:11.000000000 +0200
+++ linuxinfo-1.1.8-42/linuxinfo_common.c	2013-09-28 16:20:50.000000000 +0200
@@ -127,51 +127,28 @@
 	char temp_string[BUFSIZ], temp_string2[BUFSIZ];
 	int found;
 
-#if !defined(system_ia64) && !defined(system_mips) && !defined(system_sparc)
-        if (stat("/proc/kcore", &st_buf) < 0)
+	memory = 0;
+        meminfo_fd = open(MEMINFO_FILE, O_RDONLY);
+        found=0;
+        if (meminfo_fd < 0)
 	{
-		memory = 0;
-	}
-
-        memory = (LONGLONG)st_buf.st_size;
-        memory /= 1024; memory /= 1024;
-
-	// Highmem machines on x86 (at least) have a /proc/kcore of 896 MB
-	// so we have to check a second source: /proc/meminfo (which is
-	// less acurate, i.e., usually a few MB too small)
-#if defined(system_intel)
-	// Sometimes /proc/kcore seems to differ a few MB from 896 in this case
-	// and we don't trust values >\approx 4 GB ...
-	if (memory==887||memory==889||memory==896||memory==0||memory>3500)
-#else
-	if (memory==896||memory==0)
-#endif
-	{
-#endif
-	    meminfo_fd = open(MEMINFO_FILE, O_RDONLY);
-	    found=0;
-            if (meminfo_fd < 0)
+	    printf("Could not stat /proc/meminfo, result can be inaccurate\n");
+        }
+        else
+        { while (read_line(meminfo_fd, temp_string, BUFSIZ) != 0)
 	    {
-		printf("Could not stat /proc/meminfo, result can be inaccurate\n");
-	    }
-	    else
-	    { while (read_line(meminfo_fd, temp_string, BUFSIZ) != 0)
+		if (splitstring(temp_string, temp_string2))
 		{
-		    if (splitstring(temp_string, temp_string2))
+		    if ((strncmp(temp_string, "MemTota", strlen("MemTota")) == 0)&&!found)
 		    {
-			if ((strncmp(temp_string, "MemTota", strlen("MemTota")) == 0)&&!found)
-			{
-			    found=1;
-			    memory = (LONGLONG)atol(temp_string2);
-			    memory /= 1024; 
-			}
+		        found=1;
+		        memory = (LONGLONG)atol(temp_string2);
+		        memory /= 1024; 
 		    }
 		}
-		close(meminfo_fd);
 	    }
-#if !defined(system_ia64) && !defined(system_mips) && !defined(system_sparc)
+	    close(meminfo_fd);
 	}
-#endif
 	return memory;
 }
 
