aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-05-22 15:11:52 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-05-22 15:11:52 +0300
commit5f735dae80aa629853f4831d7b84ec1c614979eb (patch)
tree00504c1ccacba89049b96f1ec84b68bd6bdc8b80 /src
parentAdd --no-warn. (diff)
downloadxz-5f735dae80aa629853f4831d7b84ec1c614979eb.tar.xz
Use the 40 % of RAM memory usage limit in xzdec too.
Update the memory usage info text in --help to match the text in xz --long-help.
Diffstat (limited to 'src')
-rw-r--r--src/xzdec/xzdec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xzdec/xzdec.c b/src/xzdec/xzdec.c
index 90bc6579..36ff393e 100644
--- a/src/xzdec/xzdec.c
+++ b/src/xzdec/xzdec.c
@@ -82,8 +82,8 @@ help(void)
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
"\n"
-"On this configuration, the tool will use about %" PRIu64
- " MiB of memory at maximum.\n"
+"On this system and configuration, this program will use at maximum of roughly\n"
+"%" PRIu64 " MiB RAM.\n"
"\n"
"Report bugs to <" PACKAGE_BUGREPORT "> (in English or Finnish).\n",
argv0, memlimit / (1024 * 1024));
@@ -110,10 +110,10 @@ set_default_memlimit(void)
if (mem == 0)
// Cannot autodetect, use 10 MiB as the default limit.
- memlimit = (1U << 23) + (1U << 21);
+ memlimit = UINT64_C(10) * 1024 * 1024;
else
- // Limit is 33 % of RAM.
- memlimit = mem / 3;
+ // Limit is 40 % of RAM.
+ memlimit = mem * 2 / 5;
return;
}