1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00
xz-archive/src/xzdec
Lasse Collin 2672bcc9f8 Increase the default memory usage limit on "low-memory" systems.
Previously the default limit was always 40 % of RAM. The
new limit is a little bit more complex:

  - If 40 % of RAM is at least 80 MiB, 40 % of RAM is used
    as the limit.

  - If 80 % of RAM is over 80 MiB, 80 MiB is used as the limit.

  - Otherwise 80 % of RAM is used as the limit.

This should make it possible to decompress files created with
"xz -9" on more systems. Swapping is generally more expected
on systems with less RAM, so higher default limit on them
shouldn't cause too bad surprises in terms of heavy swapping.
Instead, the higher default limit should reduce the number of
bad surprises when it used to prevent decompression of files
created with "xz -9". The DoS prevention system shouldn't be
a DoS itself.

Note that even with the new default limit, a system with 64 MiB
RAM cannot decompress files created with "xz -9" without user
overriding the limit. This should be OK, because if xz is going
to need more memory than the system has RAM, it will run very
very slowly and thus it's good that user has to override the limit
in that case.
2010-03-07 13:29:28 +02:00
..
lzmadec_w32res.rc Collection of language fixes to comments and docs. 2010-02-12 13:16:15 +02:00
Makefile.am Add lzma_physmem(). 2009-11-15 12:40:17 +02:00
xzdec.1 Increase the default memory usage limit on "low-memory" systems. 2010-03-07 13:29:28 +02:00
xzdec.c Increase the default memory usage limit on "low-memory" systems. 2010-03-07 13:29:28 +02:00
xzdec_w32res.rc Collection of language fixes to comments and docs. 2010-02-12 13:16:15 +02:00