diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-09-25 13:32:54 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-09-25 13:32:54 +0200 |
commit | 41a598e21a9f6cfe8dad7759c3c9facd55774acf (patch) | |
tree | b74c8538677aaf55fa7d2bdacc6ebfbf4b57a40e /src/readahead-replay.c | |
parent | 4030d7a923427a50745fc5786f4905aa703f0bcb (diff) |
readahead: disable on low memory machines
Diffstat (limited to 'src/readahead-replay.c')
-rw-r--r-- | src/readahead-replay.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/readahead-replay.c b/src/readahead-replay.c index 1f1ec523fa..58d9468c43 100644 --- a/src/readahead-replay.c +++ b/src/readahead-replay.c @@ -206,6 +206,11 @@ int main(int argc, char*argv[]) { log_parse_environment(); log_open(); + if (!enough_ram()) { + log_info("Disabling readahead replay due to low memory."); + return 0; + } + if (replay(argc >= 2 ? argv[1] : "/") < 0) return 1; |