From: <hug...@li...> - 2012-05-30 19:10:43
|
branch: gui_overhaul details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgroot/hugin/hugin/rev/e38a9fefbb63 changeset: 5825:e38a9fefbb63 user: tmodes date: Wed May 30 19:34:25 2012 +0200 description: Cpfind: Improved max memory setting for 32 bit build on 64 bit systems diffstat: src/hugin_cpfind/cpfind/Utils.cpp | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diffs (17 lines): diff -r a44f52290a23 -r e38a9fefbb63 src/hugin_cpfind/cpfind/Utils.cpp --- a/src/hugin_cpfind/cpfind/Utils.cpp Tue May 29 21:13:13 2012 +0200 +++ b/src/hugin_cpfind/cpfind/Utils.cpp Wed May 30 19:34:25 2012 +0200 @@ -62,7 +62,13 @@ MEMORYSTATUSEX status; status.dwLength = sizeof(status); GlobalMemoryStatusEx(&status); +#ifndef _WIN64 + // when compiled as 32 bit version, we can only use about 2 GB + // even if we have more memory available on a 64 bit system + return std::min<unsigned long long>(status.ullTotalPhys, 1500*1024*1024); +#else return status.ullTotalPhys; +#endif }; #elif defined __APPLE__ unsigned long long utils::getTotalMemory() |