From 17c35cb331986cb8a69b09e46c61888d097b770c Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 13 Mar 2011 22:16:46 +1100 Subject: [PATCH] Use the usable_ram variable just to determine the maximum size allocatable. --- main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 9bc5044..35975e9 100644 --- a/main.c +++ b/main.c @@ -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();