chiark / gitweb /
uaccess: become a nop when not run on a systemd system
[elogind.git] / src / readahead-common.c
index fc49a33109a748860daa8c4ac4da9336d5b80093..f0d57b4c6e49c1192dfe50b6fc57014ab893bbd5 100644 (file)
@@ -154,9 +154,8 @@ bool enough_ram(void) {
 
         assert_se(sysinfo(&si) >= 0);
 
-        return si.totalram > 127 * 1024*1024; /* Enable readahead only
-                                               * with at least 128MB
-                                               * memory */
+        /* Enable readahead only with at least 128MB memory */
+        return si.totalram > 127 * 1024*1024 / si.mem_unit;
 }
 
 int open_inotify(void) {
@@ -209,7 +208,6 @@ finish:
         return m;
 }
 
-
 #define BUMP_REQUEST_NR (16*1024)
 
 int bump_request_nr(const char *p) {