diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-10-02 14:35:56 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-10-02 14:35:56 +0300 |
commit | 29fd321033276261b87da7be5223db33d879a4c7 (patch) | |
tree | 0f8d551186d41e06a72e291a8db6ed66cd78bb3a /src | |
parent | Use unaligned access (if possible) on both endiannesses (diff) | |
download | xz-29fd321033276261b87da7be5223db33d879a4c7.tar.xz |
Add support for --enable-assume-ram=SIZE.
Diffstat (limited to 'src')
-rw-r--r-- | src/xz/hardware.c | 7 | ||||
-rw-r--r-- | src/xzdec/xzdec.c | 5 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/xz/hardware.c b/src/xz/hardware.c index cb094abd..d5f4b9b4 100644 --- a/src/xz/hardware.c +++ b/src/xz/hardware.c @@ -68,11 +68,10 @@ hardware_memlimit_set_percentage(uint32_t percentage) uint64_t mem = tuklib_physmem(); - // If we cannot determine the amount of RAM, assume 32 MiB. Maybe - // even that is too much on some systems. But on most systems it's - // far too little, and can be annoying. + // If we cannot determine the amount of RAM, use the assumption + // defined by the configure script. if (mem == 0) - mem = UINT64_C(32) * 1024 * 1024; + mem = (uint64_t)(ASSUME_RAM) * 1024 * 1024; memlimit = percentage * mem / 100; return; diff --git a/src/xzdec/xzdec.c b/src/xzdec/xzdec.c index 18bdb04e..4f40f1d6 100644 --- a/src/xzdec/xzdec.c +++ b/src/xzdec/xzdec.c @@ -106,9 +106,10 @@ memlimit_set_percentage(uint32_t percentage) { uint64_t mem = tuklib_physmem(); - // If we cannot determine the amount of RAM, assume 32 MiB. + // If we cannot determine the amount of RAM, use the assumption + // set by the configure script. if (mem == 0) - mem = UINT64_C(32) * 1024 * 1024; + mem = (uint64_t)(ASSUME_RAM) * 1024 * 1024; memlimit = percentage * mem / 100; return; |