Use the usable_ram variable just to determine the maximum size allocatable.

This commit is contained in:
Con Kolivas 2011-03-13 22:16:46 +11:00
parent 6853c2359e
commit 17c35cb331

8
main.c
View file

@ -706,11 +706,13 @@ int main(int argc, char *argv[])
/* Use less ram when using STDOUT to store the temporary output file */
if (STDOUT)
control.maxram = control.usable_ram * 2 / 9;
control.maxram = control.ramsize * 2 / 9;
else
control.maxram = control.usable_ram / 3;
if (BITS32)
control.maxram = control.ramsize / 3;
if (BITS32) {
control.maxram = MIN(control.maxram, control.usable_ram);
control.maxram = MIN(control.maxram, two_gig);
}
round_to_page(&control.maxram);
show_summary();