Merge branch 'master' of github.com:ckolivas/lrzip

This commit is contained in:
ckolivas 2011-04-13 15:02:35 +10:00
commit 1456fcc0c6
2 changed files with 9 additions and 2 deletions

4
README
View file

@ -308,6 +308,10 @@ A. See http://www.7-zip.org and http://www.p7zip.org. Also, see the file
./lzma/C/lzmalib.h which explains the LZMA properties used and the LZMA
memory requirements and computation.
Q. This version is much slower than the old version?
A. Make sure you have set CFLAGS and CXXFLAGS. An unoptimised build will be
almost 3 times slower.
LIMITATIONS
Due to mmap limitations the maximum size a window can be set to is currently
2GB on 32bit unless the -U option is specified. Files generated on 64 bit

7
main.c
View file

@ -776,10 +776,13 @@ int main(int argc, char *argv[])
/* Decrease usable ram size on 32 bits due to kernel /
* userspace split. Cannot allocate larger than a 1
* gigabyte chunk due to 32 bit signed long being
* used in alloc */
* used in alloc, and at most 3GB can be malloced, and
* 2/3 of that makes for a total of 2GB to be split
* into thirds.
*/
control.usable_ram = MAX(control.ramsize - 900000000ll, 900000000ll);
control.maxram = MIN(control.maxram, control.usable_ram);
control.maxram = MIN(control.maxram, one_g);
control.maxram = MIN(control.maxram, one_g * 2 / 3);
} else
control.usable_ram = control.maxram;
round_to_page(&control.maxram);